diff options
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 |