diff options
author | Stan Hu <stanhu@gmail.com> | 2016-08-30 16:29:11 -0700 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2016-08-30 16:29:11 -0700 |
commit | cc3b6f12cca88d25490ef7075b69cc9fad0f04d4 (patch) | |
tree | 61d6e36c4148bd8a5cdddc2263cafab65e49bc2f /db | |
parent | 88295e07426698ce2af32af73ac0c34e540a0ba0 (diff) | |
download | gitlab-ce-cc3b6f12cca88d25490ef7075b69cc9fad0f04d4.tar.gz |
Remove not-null constraint on lock_version column if it exists
Closes #21678
Diffstat (limited to 'db')
-rw-r--r-- | db/migrate/20160830232601_change_lock_version_not_null.rb | 13 | ||||
-rw-r--r-- | db/schema.rb | 2 |
2 files changed, 14 insertions, 1 deletions
diff --git a/db/migrate/20160830232601_change_lock_version_not_null.rb b/db/migrate/20160830232601_change_lock_version_not_null.rb new file mode 100644 index 00000000000..01c58ed5bdc --- /dev/null +++ b/db/migrate/20160830232601_change_lock_version_not_null.rb @@ -0,0 +1,13 @@ +class ChangeLockVersionNotNull < ActiveRecord::Migration + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + def up + change_column_null :issues, :lock_version, true + change_column_null :merge_requests, :lock_version, true + end + + def down + end +end diff --git a/db/schema.rb b/db/schema.rb index e1ce7085c62..963d528d170 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 20160827011312) do +ActiveRecord::Schema.define(version: 20160830232601) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" |