discourse/db/migrate/20180716200103_add_theme_ke...

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

14 lines
293 B
Ruby
Raw Normal View History

# frozen_string_literal: true
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