feat(schema): #48 monthly_budget em categories + category_id em achievements

- Migration 018: ADD COLUMN monthly_budget NUMERIC(12,2) em categories
- Migration 018: ADD COLUMN category_id INTEGER REFERENCES categories(id) ON DELETE CASCADE em achievements
- Remove conquistas hardcoded veleiro_under_500 e health_3months do banco
- Reset game state do profile_id=1
- Atualiza CategoryRepository, CategoryInput e Category model para incluir monthly_budget
This commit is contained in:
2026-05-28 23:26:39 -03:00
parent 85bb60ae5a
commit f60ca423d0
9 changed files with 79 additions and 48 deletions
+4 -1
View File
@@ -59,6 +59,9 @@ var m016 string
//go:embed sql/017_user_settings.sql
var m017 string
//go:embed sql/018_dynamic_achievements.sql
var m018 string
func Run(ctx context.Context, pool *pgxpool.Pool) error {
// Bootstrap: ensure schema_migrations table exists before checking versions.
if _, err := pool.Exec(ctx, `
@@ -70,7 +73,7 @@ func Run(ctx context.Context, pool *pgxpool.Pool) error {
return fmt.Errorf("bootstrap schema_migrations: %w", err)
}
migrations := []string{m001, m002, m003, m004, m005, m006, m007, m008, m009, m010, m011, m012, m013, m014, m015, m016, m017}
migrations := []string{m001, m002, m003, m004, m005, m006, m007, m008, m009, m010, m011, m012, m013, m014, m015, m016, m017, m018}
for i, sql := range migrations {
version := i + 1
var applied bool