diff options
author | Amit Rathi <amit@hypertrack.io> | 2018-11-20 17:58:10 +0530 |
---|---|---|
committer | Amit Rathi <amit@hypertrack.io> | 2018-11-20 17:58:10 +0530 |
commit | c3bad68d1c7c96abaca1a11ffd0e7572d1a46db0 (patch) | |
tree | 7b76a35c2af714db61412e65621a47f2f328cb65 /db | |
parent | 3a3841bc8858a63d709ba343dd5513da16e7e450 (diff) | |
parent | fa5900fb6b5bda6f8568319293575c3072e47505 (diff) | |
download | gitlab-ce-c3bad68d1c7c96abaca1a11ffd0e7572d1a46db0.tar.gz |
Merge branch 'master' into certmanager-temp
Diffstat (limited to 'db')
-rw-r--r-- | db/migrate/20181112103239_drop_default_value_on_status_deployments.rb | 14 | ||||
-rw-r--r-- | db/schema.rb | 4 |
2 files changed, 16 insertions, 2 deletions
diff --git a/db/migrate/20181112103239_drop_default_value_on_status_deployments.rb b/db/migrate/20181112103239_drop_default_value_on_status_deployments.rb new file mode 100644 index 00000000000..a480c15e66b --- /dev/null +++ b/db/migrate/20181112103239_drop_default_value_on_status_deployments.rb @@ -0,0 +1,14 @@ +# frozen_string_literal: true + +class DropDefaultValueOnStatusDeployments < ActiveRecord::Migration + DOWNTIME = false + DEPLOYMENT_STATUS_SUCCESS = 2 # Equivalent to Deployment.state_machine.states['success'].value + + def up + change_column_default :deployments, :status, nil + end + + def down + change_column_default :deployments, :status, DEPLOYMENT_STATUS_SUCCESS + end +end diff --git a/db/schema.rb b/db/schema.rb index 276580e79d8..6b1ab367287 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,7 +10,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 20181107054254) do +ActiveRecord::Schema.define(version: 20181112103239) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -818,7 +818,7 @@ ActiveRecord::Schema.define(version: 20181107054254) do t.datetime "created_at" t.datetime "updated_at" t.string "on_stop" - t.integer "status", limit: 2, default: 2, null: false + t.integer "status", limit: 2, null: false t.datetime_with_timezone "finished_at" t.index ["created_at"], name: "index_deployments_on_created_at", using: :btree t.index ["deployable_type", "deployable_id"], name: "index_deployments_on_deployable_type_and_deployable_id", using: :btree |