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
23b83a9d
Verified
Commit
23b83a9d
authored
6 years ago
by
Florian Azizian
Browse files
Options
Downloads
Patches
Plain Diff
migration set added_by_entity not primary_entity
parent
9538c0b0
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
+6
-0
6 additions, 0 deletions
sql/develop.sql
with
6 additions
and
0 deletions
sql/develop.sql
+
6
−
0
View file @
23b83a9d
...
...
@@ -249,6 +249,12 @@ DO $$ BEGIN
END
IF
;
END
$$
;
ALTER
TABLE
res_mark_as_read
DROP
COLUMN
IF
EXISTS
coll_id
;
UPDATE
listinstance
SET
added_by_entity
=
'superadmin'
WHERE
added_by_user
=
'superadmin'
;
UPDATE
listinstance
SET
added_by_entity
=
(
SELECT
entity_id
FROM
users_entities
WHERE
users_entities
.
user_id
=
listinstance
.
added_by_user
AND
primary_entity
=
'Y'
)
WHERE
added_by_entity
IS
NULL
OR
added_by_entity
=
''
;
DO
$$
BEGIN
IF
(
SELECT
count
(
attname
)
FROM
pg_attribute
WHERE
attrelid
=
(
SELECT
oid
FROM
pg_class
WHERE
relname
=
'listinstance_history'
)
AND
attname
=
'updated_by_user'
)
THEN
ALTER
TABLE
listinstance_history
DROP
COLUMN
IF
EXISTS
user_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