Commit 320ae622 authored by Kamil Trzciński's avatar Kamil Trzciński

Merge branch 'drop-default-value-status-deployments' into 'master'

Drop default value on status column in deployments table

Closes #53702

See merge request gitlab-org/gitlab-ce!22971
parents f67f5917 ae949093
---
title: Drop default value on status column in deployments table
merge_request: 22971
author:
type: other
# 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
......@@ -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"
......@@ -807,7 +807,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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment