discourse/db/migrate/20210617183010_add_automati...

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

14 lines
352 B
Ruby
Raw Normal View History

# frozen_string_literal: true
class AddAutomaticColumnDirectoryColumns < ActiveRecord::Migration[6.1]
def up
if !ActiveRecord::Base.connection.column_exists?(:directory_columns, :automatic)
add_column :directory_columns, :automatic, :integer, default: true
end
end
def down
raise ActiveRecord::IrreversibleMigration
end
end