This commit is contained in:
2026-08-17 09:33:07 +02:00
parent 0dceb3a404
commit fe94c2fb9c
40 changed files with 2360 additions and 340 deletions
+8 -5
View File
@@ -1,4 +1,4 @@
A1 Slovenija tenant seed (Postgres COPY archive, gzipped)
A1 Slovenija tenant seed (Postgres COPY archive, gzipped)
File: a1-demo-data.sql.gz
Company id: 604f23a8-b66e-4b21-8b45-0d72b68f4790
@@ -57,14 +57,17 @@ Who sees what:
(switch/impersonate to a1-primary to act on A1; do not use demo API key for A1)
a1-primary@descrybe.local A1 member only (same A1 catalog; no other tenants)
Category prompts overlay (committed JSON from legacy wp_product_categories):
a1-category-prompts.json
Category prompts overlay (committed WP dump + JSON fallback):
wp_product_categories.sql — primary Sync A1 / repair source of truth
a1-category-prompts.json — JSON fallback when WP SQL is absent
Applied automatically after every `npm run seed:a1` reimport (match by normalized
category name; rewrites {""OPIS IZDELKA""} ? {{description}},
{""STARO IME IZDELKA""} ? {{name}}). Skip with -skip-category-prompts, or re-apply
category name; rewrites {""OPIS IZDELKA""} -> {{description}},
{""STARO IME IZDELKA""} -> {{name}}). Skip with -skip-category-prompts, or re-apply
without wipe:
go run ./cmd/seed-a1 -mode apply-category-prompts -file ../../scripts/seed/a1-demo-data.sql.gz
go run ./cmd/repair-category-prompts -apply
# uses scripts/seed/wp_product_categories.sql by default (SEED_A1_WP_CATEGORIES overrides)
Normal use (loads DATABASE_URL from repo-root .env if unset):
npm run seed:a1 # wipe A1-only rows, import archive, prompts + mapped category backfill