Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
OLAT CI-CD Testing Project
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Requirements
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Lars Oliver Dam
OLAT CI-CD Testing Project
Commits
5cfbe847
Commit
5cfbe847
authored
10 years ago
by
srosse
Browse files
Options
Downloads
Patches
Plain Diff
OO-1000: update setup and alter for postgresql
parent
0a0058b5
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/main/resources/database/postgresql/alter_9_4_0_to_10_0_0.sql
+22
-3
22 additions, 3 deletions
...n/resources/database/postgresql/alter_9_4_0_to_10_0_0.sql
src/main/resources/database/postgresql/setupDatabase.sql
+14
-6
14 additions, 6 deletions
src/main/resources/database/postgresql/setupDatabase.sql
with
36 additions
and
9 deletions
src/main/resources/database/postgresql/alter_9_4_0_to_10_0_0.sql
+
22
−
3
View file @
5cfbe847
...
@@ -5,9 +5,6 @@ alter table o_repositoryentry alter column softkey type varchar(36);
...
@@ -5,9 +5,6 @@ alter table o_repositoryentry alter column softkey type varchar(36);
alter
table
o_repositoryentry
alter
column
launchcounter
drop
not
null
;
alter
table
o_repositoryentry
alter
column
launchcounter
drop
not
null
;
alter
table
o_repositoryentry
alter
column
downloadcounter
drop
not
null
;
alter
table
o_repositoryentry
alter
column
downloadcounter
drop
not
null
;
alter
table
o_ep_struct_el
add
column
fk_group_id
int8
;
-- repository entry statistics table
-- repository entry statistics table
create
table
o_repositoryentry_stats
(
create
table
o_repositoryentry_stats
(
id
int8
not
null
,
id
int8
not
null
,
...
@@ -90,6 +87,28 @@ alter table o_gp_business add constraint gp_to_group_business_ctx foreign key (f
...
@@ -90,6 +87,28 @@ alter table o_gp_business add constraint gp_to_group_business_ctx foreign key (f
create
index
gp_to_group_group_idx
on
o_gp_business
(
fk_group_id
);
create
index
gp_to_group_group_idx
on
o_gp_business
(
fk_group_id
);
-- portfolio
alter
table
o_bs_invitation
alter
column
fk_secgroup
drop
not
null
;
alter
table
o_bs_invitation
alter
column
version
drop
not
null
;
alter
table
o_bs_invitation
add
column
fk_group_id
int8
;
alter
table
o_bs_invitation
add
constraint
inv_to_group_group_ctx
foreign
key
(
fk_group_id
)
references
o_bs_group
(
id
);
create
table
o_ep_struct_to_group
(
id
int8
not
null
,
creationdate
timestamp
not
null
,
r_defgroup
boolean
not
null
,
r_role
varchar
(
64
),
r_valid_from
timestamp
,
r_valid_to
timestamp
,
fk_group_id
int8
,
fk_struct_id
int8
,
primary
key
(
id
)
);
alter
table
o_ep_struct_to_group
add
constraint
struct_to_group_group_ctx
foreign
key
(
fk_group_id
)
references
o_bs_group
(
id
);
alter
table
o_ep_struct_to_group
add
constraint
struct_to_group_re_ctx
foreign
key
(
fk_struct_id
)
references
o_ep_struct_el
(
structure_id
);
-- managed groups
-- managed groups
drop
view
o_gp_business_v
;
drop
view
o_gp_business_v
;
create
or
replace
view
o_gp_business_v
as
(
create
or
replace
view
o_gp_business_v
as
(
...
...
This diff is collapsed.
Click to expand it.
src/main/resources/database/postgresql/setupDatabase.sql
+
14
−
6
View file @
5cfbe847
...
@@ -641,17 +641,27 @@ create table o_ep_struct_artefact_link (
...
@@ -641,17 +641,27 @@ create table o_ep_struct_artefact_link (
fk_artefact_id
int8
not
null
,
fk_artefact_id
int8
not
null
,
primary
key
(
link_id
)
primary
key
(
link_id
)
);
);
create
table
o_ep_struct_to_group
(
id
int8
not
null
,
creationdate
timestamp
not
null
,
r_defgroup
boolean
not
null
,
r_role
varchar
(
64
),
r_valid_from
timestamp
,
r_valid_to
timestamp
,
fk_group_id
int8
,
fk_struct_id
int8
,
primary
key
(
id
)
);
-- invitation
-- invitation
create
table
o_bs_invitation
(
create
table
o_bs_invitation
(
id
int8
not
null
,
id
int8
not
null
,
version
int4
not
null
,
creationdate
timestamp
,
creationdate
timestamp
,
token
varchar
(
64
)
not
null
,
token
varchar
(
64
)
not
null
,
first_name
varchar
(
64
),
first_name
varchar
(
64
),
last_name
varchar
(
64
),
last_name
varchar
(
64
),
mail
varchar
(
128
),
mail
varchar
(
128
),
fk_
sec
group
int8
,
fk_group
_id
int8
,
primary
key
(
id
)
primary
key
(
id
)
);
);
...
@@ -1848,8 +1858,6 @@ create index identstatus_idx on o_bs_identity (status);
...
@@ -1848,8 +1858,6 @@ create index identstatus_idx on o_bs_identity (status);
create
index
idx_ident_creationdate_idx
on
o_bs_identity
(
creationdate
);
create
index
idx_ident_creationdate_idx
on
o_bs_identity
(
creationdate
);
create
index
idx_id_lastlogin_idx
on
o_bs_identity
(
lastlogin
);
create
index
idx_id_lastlogin_idx
on
o_bs_identity
(
lastlogin
);
alter
table
o_bs_policy
add
constraint
FK9A1C5109F9C3F1D
foreign
key
(
oresource_id
)
references
o_olatresource
;
create
index
idx_policy_rsrc_idx
on
o_bs_policy
(
oresource_id
);
alter
table
o_bs_policy
add
constraint
FK9A1C5101E2E76DB
foreign
key
(
group_id
)
references
o_bs_secgroup
;
alter
table
o_bs_policy
add
constraint
FK9A1C5101E2E76DB
foreign
key
(
group_id
)
references
o_bs_secgroup
;
create
index
idx_policy_grp_idx
on
o_bs_policy
(
group_id
);
create
index
idx_policy_grp_idx
on
o_bs_policy
(
group_id
);
create
index
idx_policy_grp_rsrc_idx
on
o_bs_policy
(
oresource_id
,
group_id
);
create
index
idx_policy_grp_rsrc_idx
on
o_bs_policy
(
oresource_id
,
group_id
);
...
@@ -1860,8 +1868,8 @@ alter table o_bs_membership add constraint FK7B6288B4B85B522C foreign key (secgr
...
@@ -1860,8 +1868,8 @@ alter table o_bs_membership add constraint FK7B6288B4B85B522C foreign key (secgr
create
index
idx_membership_sec_idx
on
o_bs_membership
(
secgroup_id
);
create
index
idx_membership_sec_idx
on
o_bs_membership
(
secgroup_id
);
create
index
idx_membership_sec_ident_idx
on
o_bs_membership
(
identity_id
,
secgroup_id
);
create
index
idx_membership_sec_ident_idx
on
o_bs_membership
(
identity_id
,
secgroup_id
);
alter
table
o_bs_invitation
add
constraint
FKF26C8375236F27X
foreign
key
(
fk_
sec
group
)
references
o_bs_
sec
group
(
id
);
alter
table
o_bs_invitation
add
constraint
inv_to_group_group_ctx
foreign
key
(
fk_group
_id
)
references
o_bs_group
(
id
);
create
index
idx_inv
itation_grp_id
x
on
o_bs_invitation
(
fk_
sec
group
);
create
index
idx_inv
_to_group_group_ct
x
on
o_bs_invitation
(
fk_group
_id
);
create
index
idx_secgroup_creationdate_idx
on
o_bs_secgroup
(
creationdate
);
create
index
idx_secgroup_creationdate_idx
on
o_bs_secgroup
(
creationdate
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment