diff options
author | Rydkin Maxim <maks.rydkin@gmail.com> | 2017-03-28 21:01:28 +0300 |
---|---|---|
committer | Rydkin Maxim <maks.rydkin@gmail.com> | 2017-04-04 21:11:25 +0300 |
commit | b9f7d4b45e0456c35d8e95977bb2f9281cde69b4 (patch) | |
tree | 845ec77ec4b9dcd01983a2fdf3cbe4411fae2491 /db/migrate/20170312114329_add_auto_canceled_by_id_to_pipeline.rb | |
parent | 14722b66a1ee0dd711a631a8d48e8761334ed4a4 (diff) |
split up migrations
Diffstat (limited to 'db/migrate/20170312114329_add_auto_canceled_by_id_to_pipeline.rb')
-rw-r--r-- | db/migrate/20170312114329_add_auto_canceled_by_id_to_pipeline.rb | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/db/migrate/20170312114329_add_auto_canceled_by_id_to_pipeline.rb b/db/migrate/20170312114329_add_auto_canceled_by_id_to_pipeline.rb index 6e89967e4be..813813225e0 100644 --- a/db/migrate/20170312114329_add_auto_canceled_by_id_to_pipeline.rb +++ b/db/migrate/20170312114329_add_auto_canceled_by_id_to_pipeline.rb @@ -21,22 +21,9 @@ class AddAutoCanceledByIdToPipeline < ActiveRecord::Migration # # To disable transactions uncomment the following line and remove these # comments: - disable_ddl_transaction! - - def up - on_delete = - if Gitlab::Database.mysql? - :nullify - else - 'SET NULL' - end + # disable_ddl_transaction! + def change add_column :ci_pipelines, :auto_canceled_by_id, :integer - add_concurrent_foreign_key :ci_pipelines, :ci_pipelines, column: :auto_canceled_by_id, on_delete: on_delete - end - - def down - remove_foreign_key :ci_pipelines, column: :auto_canceled_by_id - remove_column :ci_pipelines, :auto_canceled_by_id end end |