mirror of
https://github.com/we-promise/sure.git
synced 2026-04-19 03:54:08 +00:00
Update database migrations and strengthen db smoke tests (#462)
This commit is contained in:
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
@@ -96,7 +96,7 @@ jobs:
|
||||
env:
|
||||
RAILS_ENV: test
|
||||
DATABASE_URL: postgres://postgres:postgres@localhost:5432
|
||||
run: bin/rails db:reset
|
||||
run: bin/rails db:drop db:create db:migrate db:seed
|
||||
|
||||
- name: Keep screenshots from failed system tests
|
||||
uses: actions/upload-artifact@v4
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
class ReplaceMoneyField < ActiveRecord::Migration[7.2]
|
||||
def change
|
||||
add_column :accounts, :balance_cents
|
||||
add_column :accounts, :balance_cents, :integer
|
||||
change_column :accounts, :balance_cents, :integer, limit: 8
|
||||
|
||||
Account.reset_column_information
|
||||
|
||||
@@ -6,7 +6,6 @@ class RedoMoneyStorage < ActiveRecord::Migration[7.2]
|
||||
add_column :accounts, :converted_currency, :string, default: "USD"
|
||||
|
||||
remove_column :accounts, :balance_cents
|
||||
remove_column :accounts, :balance_currency
|
||||
remove_column :accounts, :currency
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user