product on shelf
This commit is contained in:
13
main.go
13
main.go
@@ -156,6 +156,19 @@ func main() {
|
||||
ON catalogueuploads (tenantid, locationid, created DESC)`).Error; err != nil {
|
||||
log.Println("⚠️ could not add catalogueuploads scope index:", err)
|
||||
}
|
||||
// The sheet's own prices and opening stock, kept so shelving can happen
|
||||
// after the browser that uploaded it is gone.
|
||||
//
|
||||
// Added separately from the CREATE above because the table already exists in
|
||||
// production without it. The ingest service holds none of this — its
|
||||
// catalogue is shared by every merchant and carries no price and no stock —
|
||||
// so before this column the join could only be made in the tab that did the
|
||||
// upload, and that tab is normally long closed by the time their admin
|
||||
// releases the drop and the run finishes.
|
||||
if err := db.DB.Exec(
|
||||
`ALTER TABLE catalogueuploads ADD COLUMN IF NOT EXISTS sheetrows jsonb`).Error; err != nil {
|
||||
log.Fatal("could not add catalogueuploads.sheetrows:", err)
|
||||
}
|
||||
|
||||
f := facade.NewFacade(db.DB, db.CatalogueDB)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user