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
fbdc335d
Commit
fbdc335d
authored
May 17, 2017
by
Oswaldo Ferreira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revertible related_issues table state
parent
3720198d
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
3 deletions
+9
-3
db/migrate/20170424131911_create_related_issues_table.rb
db/migrate/20170424131911_create_related_issues_table.rb
+7
-1
db/schema.rb
db/schema.rb
+2
-2
No files found.
db/migrate/20170424131911_create_related_issues_table.rb
View file @
fbdc335d
...
@@ -3,7 +3,9 @@ class CreateRelatedIssuesTable < ActiveRecord::Migration
...
@@ -3,7 +3,9 @@ class CreateRelatedIssuesTable < ActiveRecord::Migration
DOWNTIME
=
false
DOWNTIME
=
false
def
change
disable_ddl_transaction!
def
up
create_table
:related_issues
do
|
t
|
create_table
:related_issues
do
|
t
|
t
.
integer
:issue_id
,
null:
false
,
index:
true
t
.
integer
:issue_id
,
null:
false
,
index:
true
t
.
integer
:related_issue_id
,
null:
false
,
index:
true
t
.
integer
:related_issue_id
,
null:
false
,
index:
true
...
@@ -16,4 +18,8 @@ class CreateRelatedIssuesTable < ActiveRecord::Migration
...
@@ -16,4 +18,8 @@ class CreateRelatedIssuesTable < ActiveRecord::Migration
add_concurrent_foreign_key
:related_issues
,
:issues
,
column: :issue_id
add_concurrent_foreign_key
:related_issues
,
:issues
,
column: :issue_id
add_concurrent_foreign_key
:related_issues
,
:issues
,
column: :related_issue_id
add_concurrent_foreign_key
:related_issues
,
:issues
,
column: :related_issue_id
end
end
def
down
drop_table
:related_issues
end
end
end
db/schema.rb
View file @
fbdc335d
...
@@ -1747,8 +1747,8 @@ ActiveRecord::Schema.define(version: 20170602003304) do
...
@@ -1747,8 +1747,8 @@ ActiveRecord::Schema.define(version: 20170602003304) do
add_foreign_key
"protected_tag_create_access_levels"
,
"namespaces"
,
column:
"group_id"
add_foreign_key
"protected_tag_create_access_levels"
,
"namespaces"
,
column:
"group_id"
add_foreign_key
"protected_tag_create_access_levels"
,
"protected_tags"
add_foreign_key
"protected_tag_create_access_levels"
,
"protected_tags"
add_foreign_key
"protected_tag_create_access_levels"
,
"users"
add_foreign_key
"protected_tag_create_access_levels"
,
"users"
add_foreign_key
"related_issues"
,
"issues"
add_foreign_key
"related_issues"
,
"issues"
,
column:
"related_issue_id"
,
name:
"fk_f89e405611"
,
on_delete: :cascade
add_foreign_key
"related_issues"
,
"issues"
,
column:
"related_issue_id"
add_foreign_key
"related_issues"
,
"issues"
,
name:
"fk_7bc934491d"
,
on_delete: :cascade
add_foreign_key
"remote_mirrors"
,
"projects"
add_foreign_key
"remote_mirrors"
,
"projects"
add_foreign_key
"subscriptions"
,
"projects"
,
on_delete: :cascade
add_foreign_key
"subscriptions"
,
"projects"
,
on_delete: :cascade
add_foreign_key
"system_note_metadata"
,
"notes"
,
name:
"fk_d83a918cb1"
,
on_delete: :cascade
add_foreign_key
"system_note_metadata"
,
"notes"
,
name:
"fk_d83a918cb1"
,
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