diff options
author | Matija Čupić <matteeyah@gmail.com> | 2017-12-22 20:22:29 +0100 |
---|---|---|
committer | Matija Čupić <matteeyah@gmail.com> | 2017-12-22 20:27:54 +0100 |
commit | f58cc2ee6044ab3445ff9a4438faa29b30b303fe (patch) | |
tree | b245dce4e07f9c06651669817ba548a11d0e8b80 /db | |
parent | 705022d11422e42f5ff2473bdc1c80ddd0be9529 (diff) | |
download | gitlab-ce-f58cc2ee6044ab3445ff9a4438faa29b30b303fe.tar.gz |
Remove default value from cache_index migration
Diffstat (limited to 'db')
-rw-r--r-- | db/migrate/20171222183504_add_cache_index_to_project.rb | 10 | ||||
-rw-r--r-- | db/schema.rb | 2 |
2 files changed, 3 insertions, 9 deletions
diff --git a/db/migrate/20171222183504_add_cache_index_to_project.rb b/db/migrate/20171222183504_add_cache_index_to_project.rb index f43be14fb42..e1d73db1ab0 100644 --- a/db/migrate/20171222183504_add_cache_index_to_project.rb +++ b/db/migrate/20171222183504_add_cache_index_to_project.rb @@ -7,13 +7,7 @@ class AddCacheIndexToProject < ActiveRecord::Migration # Set this constant to true if this migration requires downtime. DOWNTIME = false - disable_ddl_transaction! - - def up - add_column_with_default(:projects, :cache_index, :integer, default: 0) - end - - def down - remove_column(:projects, :cache_index) + def change + add_column :projects, :cache_index, :integer end end diff --git a/db/schema.rb b/db/schema.rb index 5ecfb0651c6..b7512f293a6 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -1447,7 +1447,7 @@ ActiveRecord::Schema.define(version: 20171222183504) do t.boolean "repository_read_only" t.boolean "merge_requests_ff_only_enabled", default: false t.boolean "merge_requests_rebase_enabled", default: false, null: false - t.integer "cache_index", default: 0, null: false + t.integer "cache_index" end add_index "projects", ["ci_id"], name: "index_projects_on_ci_id", using: :btree |