1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-07-19 13:19:39 +02:00
Maybe/db/migrate/20240707130331_create_account_syncs.rb
Zach Gollwitzer c6bdf49f10
Account::Sync model and test fixture simplifications (#968)
* Add sync model

* Fresh fixtures for sync tests

* Sync tests overhaul

* Fix entry tests

* Complete remaining model test updates

* Update system tests

* Update demo data task

* Add system tests back to PR checks

* More simplifications, add empty family to fixtures for easier testing
2024-07-10 11:22:59 -04:00

18 lines
561 B
Ruby

class CreateAccountSyncs < ActiveRecord::Migration[7.2]
def change
create_table :account_syncs, id: :uuid do |t|
t.references :account, null: false, foreign_key: true, type: :uuid
t.string :status, null: false, default: "pending"
t.date :start_date
t.datetime :last_ran_at
t.string :error
t.text :warnings, array: true, default: []
t.timestamps
end
remove_column :accounts, :status, :string
remove_column :accounts, :sync_warnings, :jsonb
remove_column :accounts, :sync_errors, :jsonb
end
end