Skip to content

armgit / maybe

Public Imported from GitHub
0

The personal finance app for everyone

fix migration and add smoke test for migrations (#438)

Adrien Polyd3151be9ae12
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 73c24574..9d92bb91 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -3,7 +3,7 @@ name: CI
on:
pull_request:
push:
- branches: [ main ]
+ branches: [main]
jobs:
scan_ruby:
@@ -92,6 +92,12 @@ jobs:
# REDIS_URL: redis://localhost:6379/0
run: bin/rails db:setup test test:system
+ - name: Smoke test database seeds
+ env:
+ RAILS_ENV: test
+ DATABASE_URL: postgres://postgres:postgres@localhost:5432
+ run: bin/rails db:reset
+
- name: Keep screenshots from failed system tests
uses: actions/upload-artifact@v4
if: failure()
diff --git a/db/migrate/20240206031739_replace_money_field.rb b/db/migrate/20240206031739_replace_money_field.rb
index 4c5ef9db..48e4d188 100644
--- a/db/migrate/20240206031739_replace_money_field.rb
+++ b/db/migrate/20240206031739_replace_money_field.rb
@@ -1,6 +1,6 @@
class ReplaceMoneyField < ActiveRecord::Migration[7.2]
def change
- add_monetize :accounts, :balance
+ add_column :accounts, :balance_cents
change_column :accounts, :balance_cents, :integer, limit: 8
Account.reset_column_information