Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
f901b03e
Commit
f901b03e
authored
Sep 10, 2019
by
GitLab Bot
Browse files
Options
Browse Files
Download
Plain Diff
Automatic merge of gitlab-org/gitlab-ce master
parents
3ca312d3
5975f55c
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
3 deletions
+13
-3
db/migrate/20190826100605_add_group_column_to_events.rb
db/migrate/20190826100605_add_group_column_to_events.rb
+12
-2
db/schema.rb
db/schema.rb
+1
-1
No files found.
db/migrate/20190826100605_add_group_column_to_events.rb
View file @
f901b03e
# frozen_string_literal: true
class
AddGroupColumnToEvents
<
ActiveRecord
::
Migration
[
5.2
]
include
Gitlab
::
Database
::
MigrationHelpers
DOWNTIME
=
false
def
change
add_reference
:events
,
:group
,
index:
true
,
foreign_key:
{
to_table: :namespaces
,
on_delete: :cascade
}
disable_ddl_transaction!
def
up
add_column
(
:events
,
:group_id
,
:bigint
)
unless
column_exists?
(
:events
,
:group_id
)
add_concurrent_index
(
:events
,
:group_id
)
add_concurrent_foreign_key
(
:events
,
:namespaces
,
column: :group_id
,
on_delete: :cascade
)
end
def
down
remove_column
(
:events
,
:group_id
)
if
column_exists?
(
:events
,
:group_id
)
end
end
db/schema.rb
View file @
f901b03e
...
...
@@ -3864,7 +3864,7 @@ ActiveRecord::Schema.define(version: 2019_09_05_223900) do
add_foreign_key
"epics"
,
"users"
,
column:
"assignee_id"
,
name:
"fk_dccd3f98fc"
,
on_delete: :nullify
add_foreign_key
"epics"
,
"users"
,
column:
"author_id"
,
name:
"fk_3654b61b03"
,
on_delete: :cascade
add_foreign_key
"epics"
,
"users"
,
column:
"closed_by_id"
,
name:
"fk_aa5798e761"
,
on_delete: :nullify
add_foreign_key
"events"
,
"namespaces"
,
column:
"group_id"
,
on_delete: :cascade
add_foreign_key
"events"
,
"namespaces"
,
column:
"group_id"
,
name:
"fk_61fbf6ca48"
,
on_delete: :cascade
add_foreign_key
"events"
,
"projects"
,
on_delete: :cascade
add_foreign_key
"events"
,
"users"
,
column:
"author_id"
,
name:
"fk_edfd187b6f"
,
on_delete: :cascade
add_foreign_key
"external_pull_requests"
,
"projects"
,
on_delete: :cascade
...
...
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