Adiciona CRUD manual de transações (income/expense) com filtro mensal, CRUD de recorrências fixas com verificação mensal de cobertura (±10% por categoria), endpoint de ignore/unignore e telas Vue para Transações e Configurações. Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
29 lines
515 B
Go
29 lines
515 B
Go
package migration
|
|
|
|
import (
|
|
"context"
|
|
_ "embed"
|
|
"fmt"
|
|
|
|
"github.com/jackc/pgx/v5/pgxpool"
|
|
)
|
|
|
|
//go:embed sql/001_initial.sql
|
|
var m001 string
|
|
|
|
//go:embed sql/002_add_external_id.sql
|
|
var m002 string
|
|
|
|
//go:embed sql/003_recurring_ignores.sql
|
|
var m003 string
|
|
|
|
func Run(ctx context.Context, pool *pgxpool.Pool) error {
|
|
migrations := []string{m001, m002, m003}
|
|
for i, sql := range migrations {
|
|
if _, err := pool.Exec(ctx, sql); err != nil {
|
|
return fmt.Errorf("migration %03d: %w", i+1, err)
|
|
}
|
|
}
|
|
return nil
|
|
}
|