mirror of
https://github.com/discourse/discourse.git
synced 2024-11-24 00:51:03 +08:00
12 lines
262 B
Ruby
12 lines
262 B
Ruby
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
|