about summary refs log tree commit diff
path: root/db/migrate/20180410220657_create_bookmarks.rb
diff options
context:
space:
mode:
authorThibG <thib@sitedethib.com>2019-11-21 10:01:26 +0100
committerGitHub <noreply@github.com>2019-11-21 10:01:26 +0100
commit55f5e81a9dc4c6cede5d43e549061be2ea9be614 (patch)
tree6b8944b2bf8e13ba76627a0e38886dfb3b35c566 /db/migrate/20180410220657_create_bookmarks.rb
parent707c4918b21d19dd53b64120dbc7263f45fc5ecd (diff)
parente87cc59811fab285033cc78d97ad7f0b8df9c081 (diff)
Merge pull request #1246 from ThibG/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'db/migrate/20180410220657_create_bookmarks.rb')
-rw-r--r--db/migrate/20180410220657_create_bookmarks.rb10
1 files changed, 8 insertions, 2 deletions
diff --git a/db/migrate/20180410220657_create_bookmarks.rb b/db/migrate/20180410220657_create_bookmarks.rb
index 08d22c10d..bc79022e4 100644
--- a/db/migrate/20180410220657_create_bookmarks.rb
+++ b/db/migrate/20180410220657_create_bookmarks.rb
@@ -1,3 +1,6 @@
+# This migration is a duplicate of 20180831171112 and may get ignored, see
+# config/initializers/0_duplicate_migrations.rb
+
 class CreateBookmarks < ActiveRecord::Migration[5.1]
   def change
     create_table :bookmarks do |t|
@@ -7,8 +10,11 @@ class CreateBookmarks < ActiveRecord::Migration[5.1]
       t.timestamps
     end
 
-    safety_assured { add_foreign_key :bookmarks, :accounts, column: :account_id, on_delete: :cascade }
-    safety_assured { add_foreign_key :bookmarks, :statuses, column: :status_id, on_delete: :cascade }
+    safety_assured do
+      add_foreign_key :bookmarks, :accounts, column: :account_id, on_delete: :cascade
+      add_foreign_key :bookmarks, :statuses, column: :status_id, on_delete: :cascade
+    end
+
     add_index :bookmarks, [:account_id, :status_id], unique: true
   end
 end