mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: set default on theme.key, if it has not yet been dropped (#6095)
This commit is contained in:
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
|
||||
Reference in New Issue
Block a user