summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2016-08-30 16:29:11 -0700
committerStan Hu <stanhu@gmail.com>2016-08-30 16:29:11 -0700
commitcc3b6f12cca88d25490ef7075b69cc9fad0f04d4 (patch)
tree61d6e36c4148bd8a5cdddc2263cafab65e49bc2f
parent88295e07426698ce2af32af73ac0c34e540a0ba0 (diff)
downloadgitlab-ce-cc3b6f12cca88d25490ef7075b69cc9fad0f04d4.tar.gz
Remove not-null constraint on lock_version column if it exists
Closes #21678
-rw-r--r--db/migrate/20160830232601_change_lock_version_not_null.rb13
-rw-r--r--db/schema.rb2
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"