Delay PF permit competitor removal
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 35s

This commit is contained in:
Grendgi
2026-06-05 12:36:15 +03:00
parent 7a4d03c905
commit 1b8382a6ca
5 changed files with 23 additions and 3 deletions

View File

@@ -177,6 +177,7 @@ func (a *App) InitDB(ctx context.Context) error {
agency_name VARCHAR(300),
permit_number VARCHAR(100),
auto_discovered BOOLEAN NOT NULL DEFAULT 0,
permit_missing_checks INTEGER NOT NULL DEFAULT 0,
current_price FLOAT,
currency VARCHAR(10),
status VARCHAR(7) NOT NULL,
@@ -259,6 +260,11 @@ func (a *App) migrateCompetitorListings(ctx context.Context) error {
return err
}
}
if !columns["permit_missing_checks"] {
if _, err := a.DB.ExecContext(ctx, `ALTER TABLE competitor_listings ADD COLUMN permit_missing_checks INTEGER NOT NULL DEFAULT 0`); err != nil {
return err
}
}
return nil
}