mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-07-19 13:19:39 +02:00
* Allow reverting imports * Fix tests * Add currency column to all imports * Don't auto-enrich demo account
21 lines
534 B
Ruby
21 lines
534 B
Ruby
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
|