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
d8dad0ec
Commit
d8dad0ec
authored
Aug 10, 2018
by
Jasper Maes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rails5 fix AddMilestoneToLists migration rollback deleting wrong foreign key
parent
13b41035
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
1 deletion
+10
-1
ee/changelogs/unreleased/rails5-fix-migration-add-milestone-to-lists.yml
...nreleased/rails5-fix-migration-add-milestone-to-lists.yml
+5
-0
ee/db/migrate/20180724161450_add_milestone_to_lists.rb
ee/db/migrate/20180724161450_add_milestone_to_lists.rb
+5
-1
No files found.
ee/changelogs/unreleased/rails5-fix-migration-add-milestone-to-lists.yml
0 → 100644
View file @
d8dad0ec
---
title
:
Rails5 fix AddMilestoneToLists migration rollback deleting wrong foreign key
merge_request
:
6865
author
:
Jasper Maes
type
:
fixed
ee/db/migrate/20180724161450_add_milestone_to_lists.rb
View file @
d8dad0ec
class
AddMilestoneToLists
<
ActiveRecord
::
Migration
class
AddMilestoneToLists
<
ActiveRecord
::
Migration
DOWNTIME
=
false
DOWNTIME
=
false
def
change
def
up
add_reference
:lists
,
:milestone
,
index:
true
,
foreign_key:
{
on_delete: :cascade
}
add_reference
:lists
,
:milestone
,
index:
true
,
foreign_key:
{
on_delete: :cascade
}
end
end
def
down
remove_reference
:lists
,
:milestone
,
foreign_key:
true
end
end
end
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