mirror of
https://github.com/discourse/discourse.git
synced 2025-04-17 18:49:02 +08:00
FIX: set default on theme.key, if it has not yet been dropped (#6095)
This commit is contained in:
parent
331296e851
commit
f4c902b434
11
db/migrate/20180716200103_add_theme_key_default.rb
Normal file
11
db/migrate/20180716200103_add_theme_key_default.rb
Normal file
@ -0,0 +1,11 @@
|
||||
class AddThemeKeyDefault < ActiveRecord::Migration[5.2]
|
||||
def up
|
||||
if column_exists?(:themes, :key)
|
||||
execute("ALTER TABLE themes ALTER COLUMN key SET DEFAULT 'deprecated'")
|
||||
end
|
||||
end
|
||||
|
||||
def down
|
||||
raise ActiveRecord::IrreversibleMigration
|
||||
end
|
||||
end
|
Loading…
x
Reference in New Issue
Block a user