diff options
author | Kamil Trzcinski <ayufan@ayufan.eu> | 2017-03-05 23:40:59 +0300 |
---|---|---|
committer | Kamil Trzcinski <ayufan@ayufan.eu> | 2017-03-05 23:41:29 +0300 |
commit | e4a9b8a9e1f4052fde9ecacad73e2f96fdd8d21d (patch) | |
tree | e34236e4928ad2e9c4bd542867b31174a449e350 /db/migrate/20170305203726_add_owner_id_foreign_key.rb | |
parent | b626869f8fccfef65a652b0acca7c52a3647aeb3 (diff) |
Move foreign key to separate migration
Diffstat (limited to 'db/migrate/20170305203726_add_owner_id_foreign_key.rb')
-rw-r--r-- | db/migrate/20170305203726_add_owner_id_foreign_key.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/db/migrate/20170305203726_add_owner_id_foreign_key.rb b/db/migrate/20170305203726_add_owner_id_foreign_key.rb new file mode 100644 index 00000000000..3eece0e2eb5 --- /dev/null +++ b/db/migrate/20170305203726_add_owner_id_foreign_key.rb @@ -0,0 +1,11 @@ +class AddOwnerIdForeignKey < ActiveRecord::Migration + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + disable_ddl_transaction! + + def change + add_concurrent_foreign_key :ci_triggers, :users, column: :owner_id, on_delete: :cascade + end +end |