FIX: Broken DB issue following a reverted migration (#13426)

This commit is contained in:
Penar Musaraj 2021-06-17 14:41:41 -04:00 committed by GitHub
parent 36162cf396
commit 04a3cd3814
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 13 additions and 0 deletions

View File

@ -0,0 +1,13 @@
# 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