mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-08-02 20:15:22 +02:00
Feature: Add the ability to "revert" a CSV import (#1814)
* Allow reverting imports * Fix tests * Add currency column to all imports * Don't auto-enrich demo account
This commit is contained in:
parent
60925bd16c
commit
536c82f2aa
17 changed files with 125 additions and 6 deletions
21
db/migrate/20250206003115_remove_import_status_enum.rb
Normal file
21
db/migrate/20250206003115_remove_import_status_enum.rb
Normal file
|
@ -0,0 +1,21 @@
|
|||
class RemoveImportStatusEnum < ActiveRecord::Migration[7.2]
|
||||
def up
|
||||
change_column_default :imports, :status, nil
|
||||
change_column :imports, :status, :string
|
||||
execute "DROP TYPE IF EXISTS import_status"
|
||||
end
|
||||
|
||||
def down
|
||||
execute <<-SQL
|
||||
CREATE TYPE import_status AS ENUM (
|
||||
'pending',
|
||||
'importing',
|
||||
'complete',
|
||||
'failed'
|
||||
);
|
||||
SQL
|
||||
|
||||
change_column :imports, :status, :import_status, using: 'status::import_status'
|
||||
change_column_default :imports, :status, 'pending'
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue