diff options
author | Shinya Maeda <shinya@gitlab.com> | 2017-06-21 12:25:01 +0300 |
---|---|---|
committer | Shinya Maeda <shinya@gitlab.com> | 2017-07-05 12:36:18 +0300 |
commit | d278da48f837292491aaf81649afef1da3a1eb09 (patch) | |
tree | 3af83b99d6e6c2b503d1a73f0ac61604edf375ee /db/migrate/20170620065449_add_foreign_key_to_ci_pipeline_schedule_variables.rb | |
parent | 5af1fcd6f329858d757bab0d67cb50af6c820160 (diff) |
pipeline_schedule_variables model/db
Diffstat (limited to 'db/migrate/20170620065449_add_foreign_key_to_ci_pipeline_schedule_variables.rb')
-rw-r--r-- | db/migrate/20170620065449_add_foreign_key_to_ci_pipeline_schedule_variables.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/db/migrate/20170620065449_add_foreign_key_to_ci_pipeline_schedule_variables.rb b/db/migrate/20170620065449_add_foreign_key_to_ci_pipeline_schedule_variables.rb new file mode 100644 index 00000000000..7bbf66e0ac3 --- /dev/null +++ b/db/migrate/20170620065449_add_foreign_key_to_ci_pipeline_schedule_variables.rb @@ -0,0 +1,15 @@ +class AddForeignKeyToCiPipelineScheduleVariables < ActiveRecord::Migration + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + disable_ddl_transaction! + + def up + add_concurrent_foreign_key(:ci_pipeline_schedule_variables, :ci_pipeline_schedules, column: :pipeline_schedule_id) + end + + def down + remove_foreign_key(:ci_pipeline_schedule_variables, column: :pipeline_schedule_id) + end +end |