Commit 3845f12d authored by Rémy Coutable's avatar Rémy Coutable

Fix migration to make it fast

Signed-off-by: default avatarRémy Coutable <remy@rymai.me>
parent 479814b2
class NullifyHasExternalWikiInProjects < ActiveRecord::Migration
class DropAndReaddHasExternalWikiInProjects < ActiveRecord::Migration
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
DOWNTIME = false
def up
execute("UPDATE projects SET has_external_wiki = NULL")
remove_column :projects, :has_external_wiki, :boolean
add_column :projects, :has_external_wiki, :boolean
end
def down
......
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