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

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

diff --git a/db/migrate/20210617183010_add_automatic_column_directory_columns.rb b/db/migrate/20210617183010_add_automatic_column_directory_columns.rb
new file mode 100644
index 0000000..7a99404
--- /dev/null
+++ b/db/migrate/20210617183010_add_automatic_column_directory_columns.rb
@@ -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

GitHub sha: 04a3cd3814921d53c15c48470c46b13837f72cd7

This commit appears in #13426 which was approved by danielwaterworth and davidtaylorhq. It was merged by pmusaraj.