The personal finance app for everyone
Fix import migration (#1227)
Zach Gollwitzercb75c537fe13
diff --git a/db/migrate/20240925112218_add_import_types.rb b/db/migrate/20240925112218_add_import_types.rbindex ba79ec2b..50ea54da 100644--- a/db/migrate/20240925112218_add_import_types.rb+++ b/db/migrate/20240925112218_add_import_types.rb@@ -1,7 +1,7 @@class AddImportTypes < ActiveRecord::Migration[7.2]def changechange_table :imports do |t|- t.string :type, null: false+ t.string :typet.string :date_col_label, default: "date"t.string :amount_col_label, default: "amount"t.string :name_col_label, default: "name"@@ -19,6 +19,10 @@ class AddImportTypes < ActiveRecord::Migration[7.2]t.string :errorend+ Import.update_all(type: "TransactionImport")++ change_column_null :imports, :type, false+# Add import references so we can associate imported resources after the importadd_reference :account_entries, :import, foreign_key: true, type: :uuidadd_reference :accounts, :import, foreign_key: true, type: :uuid