Fix migration to make it fast
Signed-off-by: Rémy Coutable <remy@rymai.me>
This commit is contained in:
parent
479814b292
commit
3845f12de8
|
@ -0,0 +1,14 @@
|
|||
class DropAndReaddHasExternalWikiInProjects < ActiveRecord::Migration
|
||||
include Gitlab::Database::MigrationHelpers
|
||||
|
||||
# Set this constant to true if this migration requires downtime.
|
||||
DOWNTIME = false
|
||||
|
||||
def up
|
||||
remove_column :projects, :has_external_wiki, :boolean
|
||||
add_column :projects, :has_external_wiki, :boolean
|
||||
end
|
||||
|
||||
def down
|
||||
end
|
||||
end
|
|
@ -1,13 +0,0 @@
|
|||
class NullifyHasExternalWikiInProjects < 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")
|
||||
end
|
||||
|
||||
def down
|
||||
end
|
||||
end
|
Loading…
Reference in New Issue