Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
MaarchCourrier
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Redmine
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Harbor Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Maarch
MaarchCourrier
Commits
ee8913c1
Verified
Commit
ee8913c1
authored
7 years ago
by
Alex ORLUC
Browse files
Options
Downloads
Patches
Plain Diff
fix create users_baskets_preferences
parent
04d560da
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
sql/develop.sql
+13
-14
13 additions, 14 deletions
sql/develop.sql
with
13 additions
and
14 deletions
sql/develop.sql
+
13
−
14
View file @
ee8913c1
...
...
@@ -637,22 +637,21 @@ UPDATE doctypes_second_level SET css_style = '#008000' WHERE css_style = 'green_
UPDATE
doctypes_second_level
SET
css_style
=
'#800080'
WHERE
css_style
=
'violet_style'
;
UPDATE
doctypes_second_level
SET
css_style
=
'#000000'
WHERE
css_style
=
'default_style'
;
DROP
TABLE
IF
EXISTS
users_baskets_preferences
;
CREATE
TABLE
users_baskets_preferences
(
id
serial
NOT
NULL
,
user_serial_id
integer
NOT
NULL
,
group_serial_id
integer
NOT
NULL
,
basket_id
character
varying
(
32
)
NOT
NULL
,
display
boolean
NOT
NULL
,
color
character
varying
(
16
),
CONSTRAINT
users_baskets_preferences_pkey
PRIMARY
KEY
(
id
),
CONSTRAINT
users_baskets_preferences_key
UNIQUE
(
user_serial_id
,
group_serial_id
,
basket_id
)
)
WITH
(
OIDS
=
FALSE
);
DO
$$
BEGIN
IF
(
SELECT
count
(
TABLE_NAME
)
FROM
INFORMATION_SCHEMA
.
TABLES
WHERE
TABLE_NAME
=
'user_baskets_secondary'
)
=
1
THEN
DROP
TABLE
IF
EXISTS
users_baskets_preferences
;
CREATE
TABLE
users_baskets_preferences
(
id
serial
NOT
NULL
,
user_serial_id
integer
NOT
NULL
,
group_serial_id
integer
NOT
NULL
,
basket_id
character
varying
(
32
)
NOT
NULL
,
display
boolean
NOT
NULL
,
color
character
varying
(
16
),
CONSTRAINT
users_baskets_preferences_pkey
PRIMARY
KEY
(
id
),
CONSTRAINT
users_baskets_preferences_key
UNIQUE
(
user_serial_id
,
group_serial_id
,
basket_id
)
)
WITH
(
OIDS
=
FALSE
);
INSERT
INTO
users_baskets_preferences
(
user_serial_id
,
group_serial_id
,
basket_id
,
display
)
SELECT
users
.
id
,
usergroups
.
id
,
groupbasket
.
basket_id
,
TRUE
FROM
users
,
usergroups
,
groupbasket
,
usergroup_content
WHERE
usergroup_content
.
primary_group
=
'Y'
AND
groupbasket
.
group_id
=
usergroup_content
.
group_id
AND
users
.
user_id
=
usergroup_content
.
user_id
AND
usergroups
.
group_id
=
usergroup_content
.
group_id
...
...
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