Delay PF permit competitor removal
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 35s
All checks were successful
Build and Deploy / build-and-deploy (push) Successful in 35s
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user