diff options
author | Zeger-Jan van de Weg <git@zjvandeweg.nl> | 2017-09-07 13:53:30 +0200 |
---|---|---|
committer | Zeger-Jan van de Weg <git@zjvandeweg.nl> | 2017-09-07 13:53:30 +0200 |
commit | 492eaece7ec80090fd7276758798a2af49fe9763 (patch) | |
tree | 730b31ccd2016767a9cce6e56c52acc10369c1f0 /db/migrate | |
parent | cd8ea329f0d64c04e5dee00fb8916268dae7a6f7 (diff) | |
download | gitlab-ce-492eaece7ec80090fd7276758798a2af49fe9763.tar.gz |
Fix ordering of columns on new table
Diffstat (limited to 'db/migrate')
-rw-r--r-- | db/migrate/20170828093725_create_project_auto_dev_ops.rb | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/db/migrate/20170828093725_create_project_auto_dev_ops.rb b/db/migrate/20170828093725_create_project_auto_dev_ops.rb index 00bf29f874c..c1bb4f20c1d 100644 --- a/db/migrate/20170828093725_create_project_auto_dev_ops.rb +++ b/db/migrate/20170828093725_create_project_auto_dev_ops.rb @@ -3,19 +3,14 @@ class CreateProjectAutoDevOps < ActiveRecord::Migration DOWNTIME = false - disable_ddl_transaction! - def up create_table :project_auto_devops do |t| - t.belongs_to :project, null: false, index: { unique: true } + t.belongs_to :project, null: false, index: { unique: true }, foreign_key: { on_delete: :cascade } + t.datetime_with_timezone :created_at, null: false + t.datetime_with_timezone :updated_at, null: false t.boolean :enabled, default: nil, null: true t.string :domain end - - add_timestamps_with_timezone(:project_auto_devops, null: false) - - # No need to check for violations as its a new table - add_concurrent_foreign_key(:project_auto_devops, :projects, column: :project_id) end def down |