2019-05-02 18:17:27 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2018-07-16 18:40:35 -04:00
|
|
|
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
|