Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
intranet-core
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
project-open
intranet-core
Commits
4b1fbe62
Commit
4b1fbe62
authored
Aug 20, 2004
by
Frank Bergmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Many changes at draco
- Changed im_cost_items to im_costs - Started with repeating costs index
parent
6635d7da
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
40 additions
and
88 deletions
+40
-88
intranet-categories.sql
sql/oracle/intranet-categories.sql
+0
-59
intranet-core-create.sql
sql/oracle/intranet-core-create.sql
+40
-29
No files found.
sql/oracle/intranet-categories.sql
View file @
4b1fbe62
...
@@ -201,39 +201,6 @@ select category_id as partner_type_id, category as partner_type
...
@@ -201,39 +201,6 @@ select category_id as partner_type_id, category as partner_type
from
im_categories
from
im_categories
where
category_type
=
'Intranet Partner Type'
;
where
category_type
=
'Intranet Partner Type'
;
------------------------------------------------------
-- HR
--
create
or
replace
view
im_prior_experiences
as
select
category_id
as
experience_id
,
category
as
experience
from
im_categories
where
category_type
=
'Intranet Prior Experience'
;
create
or
replace
view
im_hiring_sources
as
select
category_id
as
source_id
,
category
as
source
from
im_categories
where
category_type
=
'Intranet Hiring Source'
;
create
or
replace
view
im_job_titles
as
select
category_id
as
job_title_id
,
category
as
job_title
from
im_categories
where
category_type
=
'Intranet Job Title'
;
create
or
replace
view
im_departments
as
select
category_id
as
department_id
,
category
as
department
from
im_categories
where
category_type
=
'Intranet Department'
;
create
or
replace
view
im_qualification_processes
as
select
category_id
as
qualification_id
,
category
as
qualification
from
im_categories
where
category_type
=
'Intranet Qualification Process'
;
create
or
replace
view
im_employee_pipeline_states
as
select
category_id
as
state_id
,
category
as
state
from
im_categories
where
category_type
=
'Intranet Employee Pipeline State'
;
------------------------------------------------------
------------------------------------------------------
-- Offices
-- Offices
--
--
...
@@ -422,32 +389,6 @@ insert into im_categories ( CATEGORY_DESCRIPTION, ENABLED_P, CATEGORY_ID, CATEGO
...
@@ -422,32 +389,6 @@ insert into im_categories ( CATEGORY_DESCRIPTION, ENABLED_P, CATEGORY_ID, CATEGO
insert
into
im_categories
(
CATEGORY_DESCRIPTION
,
ENABLED_P
,
CATEGORY_ID
,
CATEGORY
,
CATEGORY_TYPE
)
values
insert
into
im_categories
(
CATEGORY_DESCRIPTION
,
ENABLED_P
,
CATEGORY_ID
,
CATEGORY
,
CATEGORY_TYPE
)
values
(
''
,
'f'
,
134
,
'Full Time'
,
'Intranet Task Board Time Frame'
);
(
''
,
'f'
,
134
,
'Full Time'
,
'Intranet Task Board Time Frame'
);
-- Intranet Departments
insert
into
im_categories
(
CATEGORY_DESCRIPTION
,
ENABLED_P
,
CATEGORY_ID
,
CATEGORY
,
CATEGORY_TYPE
)
values
(
''
,
'f'
,
'201'
,
'Administration'
,
'Intranet Department'
);
insert
into
im_categories
(
CATEGORY_DESCRIPTION
,
ENABLED_P
,
CATEGORY_ID
,
CATEGORY
,
CATEGORY_TYPE
)
values
(
''
,
'f'
,
'202'
,
'Business Development'
,
'Intranet Department'
);
insert
into
im_categories
(
CATEGORY_DESCRIPTION
,
ENABLED_P
,
CATEGORY_ID
,
CATEGORY
,
CATEGORY_TYPE
)
values
(
''
,
'f'
,
'203'
,
'Client services'
,
'Intranet Department'
);
insert
into
im_categories
(
CATEGORY_DESCRIPTION
,
ENABLED_P
,
CATEGORY_ID
,
CATEGORY
,
CATEGORY_TYPE
)
values
(
''
,
'f'
,
'204'
,
'Finance'
,
'Intranet Department'
);
insert
into
im_categories
(
CATEGORY_DESCRIPTION
,
ENABLED_P
,
CATEGORY_ID
,
CATEGORY
,
CATEGORY_TYPE
)
values
(
''
,
'f'
,
'205'
,
'Internal IT Support'
,
'Intranet Department'
);
insert
into
im_categories
(
CATEGORY_DESCRIPTION
,
ENABLED_P
,
CATEGORY_ID
,
CATEGORY
,
CATEGORY_TYPE
)
values
(
''
,
'f'
,
'206'
,
'Legal'
,
'Intranet Department'
);
insert
into
im_categories
(
CATEGORY_DESCRIPTION
,
ENABLED_P
,
CATEGORY_ID
,
CATEGORY
,
CATEGORY_TYPE
)
values
(
''
,
'f'
,
'207'
,
'Marketing'
,
'Intranet Department'
);
insert
into
im_categories
(
CATEGORY_DESCRIPTION
,
ENABLED_P
,
CATEGORY_ID
,
CATEGORY
,
CATEGORY_TYPE
)
values
(
''
,
'f'
,
'208'
,
'Office management'
,
'Intranet Department'
);
insert
into
im_categories
(
CATEGORY_DESCRIPTION
,
ENABLED_P
,
CATEGORY_ID
,
CATEGORY
,
CATEGORY_TYPE
)
values
(
''
,
'f'
,
'209'
,
'Operations'
,
'Intranet Department'
);
insert
into
im_categories
(
CATEGORY_DESCRIPTION
,
ENABLED_P
,
CATEGORY_ID
,
CATEGORY
,
CATEGORY_TYPE
)
values
(
''
,
'f'
,
'210'
,
'Human Resources'
,
'Intranet Department'
);
insert
into
im_categories
(
CATEGORY_DESCRIPTION
,
ENABLED_P
,
CATEGORY_ID
,
CATEGORY
,
CATEGORY_TYPE
)
values
(
''
,
'f'
,
'211'
,
'Sales'
,
'Intranet Department'
);
insert
into
im_categories
(
CATEGORY_DESCRIPTION
,
ENABLED_P
,
CATEGORY_ID
,
CATEGORY
,
CATEGORY_TYPE
)
values
(
''
,
'f'
,
'212'
,
'Senior Management'
,
'Intranet Department'
);
-- Intranet Anual Revenue
-- Intranet Anual Revenue
...
...
sql/oracle/intranet-core-create.sql
View file @
4b1fbe62
...
@@ -266,81 +266,92 @@ prompt *** intranet-potransdemo-data - Project/Open Translation Demo Data
...
@@ -266,81 +266,92 @@ prompt *** intranet-potransdemo-data - Project/Open Translation Demo Data
-- im_start_blocks record the dates these blocks will start for
-- im_start_blocks record the dates these blocks will start for
-- this system.
-- this system.
create
table
im_start_blocks
(
create
table
im_start_weeks
(
start_block
date
not
null
,
start_block
date
not
null
block_type
varchar
(
50
)
constraint
im_start_weeks_pk
constraint
im_start_blocks_type_ck
primary
key
,
check
(
block_type
in
(
'week'
,
'month'
)),
-- We might want to tag a larger unit
-- We might want to tag a larger unit
-- For example, if start_block is the first
-- For example, if start_block is the first
-- Sunday of a week, those tagged with
-- Sunday of a week, those tagged with
-- start_of_larger_unit_p might tag
-- start_of_larger_unit_p might tag
-- the first Sunday of a month
-- the first Sunday of a month
start_of_larger_unit_p
char
(
1
)
default
'f'
start_of_larger_unit_p
char
(
1
)
default
'f'
constraint
im_start_
bloc
ks_larger_ck
constraint
im_start_
wee
ks_larger_ck
check
(
start_of_larger_unit_p
in
(
't'
,
'f'
)),
check
(
start_of_larger_unit_p
in
(
't'
,
'f'
)),
note
varchar
(
4000
),
note
varchar
(
4000
)
constraint
im_start_blocks_pk
primary
key
(
start_block
,
block_type
)
);
);
create
table
im_start_months
(
start_block
date
not
null
constraint
im_start_months_pk
primary
key
,
-- We might want to tag a larger unit
-- For example, if start_block is the first
-- Sunday of a week, those tagged with
-- start_of_larger_unit_p might tag
-- the first Sunday of a month
start_of_larger_unit_p
char
(
1
)
default
'f'
constraint
im_start_months_larger_ck
check
(
start_of_larger_unit_p
in
(
't'
,
'f'
)),
note
varchar
(
4000
)
);
-- Populate im_start_
blocks with
weeks. Start with Sunday,
-- Populate im_start_weeks. Start with Sunday,
-- Jan 7th 1996 and end after inserting 1000 weeks. Note
-- Jan 7th 1996 and end after inserting 1000 weeks. Note
-- that 1000 is a completely arbitrary number.
-- that 1000 is a completely arbitrary number.
DECLARE
DECLARE
v_max
integer
;
v_max
integer
;
v_i
integer
;
v_i
integer
;
v_first_block_of_month
integer
;
v_first_block_of_month
integer
;
v_next_start_
bloc
k
date
;
v_next_start_
wee
k
date
;
BEGIN
BEGIN
v_max
:
=
1000
;
v_max
:
=
1000
;
FOR
v_i
IN
0
..
v_max
-
1
LOOP
FOR
v_i
IN
0
..
v_max
-
1
LOOP
-- for convenience, select out the next start block to insert into a variable
-- for convenience, select out the next start block to insert into a variable
select
to_date
(
'1996-01-07'
,
'YYYY-MM-DD'
)
+
v_i
*
7
select
to_date
(
'1996-01-07'
,
'YYYY-MM-DD'
)
+
v_i
*
7
into
v_next_start_
bloc
k
into
v_next_start_
wee
k
from
dual
;
from
dual
;
insert
into
im_start_blocks
(
insert
into
im_start_weeks
(
start_block
,
start_block
block_type
)
values
(
)
values
(
to_date
(
v_next_start_block
),
to_date
(
v_next_start_week
)
'week'
);
);
-- set the start_of_larger_unit_p flag if this is the first
-- set the start_of_larger_unit_p flag if this is the first
-- start block of the month
-- start block of the month
update
im_start_
bloc
ks
update
im_start_
wee
ks
set
start_of_larger_unit_p
=
't'
set
start_of_larger_unit_p
=
't'
where
start_block
=
to_date
(
v_next_start_
bloc
k
)
where
start_block
=
to_date
(
v_next_start_
wee
k
)
and
not
exists
(
and
not
exists
(
select
1
select
1
from
im_start_
bloc
ks
from
im_start_
wee
ks
where
to_char
(
start_block
,
'YYYY-MM'
)
=
where
to_char
(
start_block
,
'YYYY-MM'
)
=
to_char
(
v_next_start_
bloc
k
,
'YYYY-MM'
)
to_char
(
v_next_start_
wee
k
,
'YYYY-MM'
)
and
start_of_larger_unit_p
=
't'
);
and
start_of_larger_unit_p
=
't'
);
END
LOOP
;
END
LOOP
;
END
;
/
show
errors
;
-- Populate im_start_months. Start with im_start_weeks
-- dates and check for the beginning of a new month.
BEGIN
for
row
in
(
for
row
in
(
select
unique
concat
(
to_char
(
start_block
,
'YYYY-MM'
),
'-01'
)
as
first_day_in_month
select
unique
concat
(
to_char
(
start_block
,
'YYYY-MM'
),
'-01'
)
as
first_day_in_month
from
im_start_blocks
from
im_start_weeks
where
block_type
=
'week'
)
loop
)
loop
insert
into
im_start_blocks
(
insert
into
im_start_months
(
start_block
,
start_block
block_type
)
values
(
)
values
(
to_date
(
row
.
first_day_in_month
),
to_date
(
row
.
first_day_in_month
)
'month'
);
);
end
loop
;
end
loop
;
END
;
END
;
/
/
show
errors
;
show
errors
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment