build: release build of admin, user apps and api
Rebuilt dist/ and api release bundle, with the migration for catalog paging indexes. Fix Less build error: fade(@token, N%) on theme tokens failed in both user-app and user-app-v2 CustomerChoiceView; use alpha(), the project's token-aware helper. Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Haiku 5.5
parent
8b74c85a2a
commit
6ccdbc06f0
@@ -0,0 +1,30 @@
|
||||
-- Catalogue paging indexes.
|
||||
--
|
||||
-- Owner, 2026-10-12: «دیتاها در اپ واقعی تا 16 هزار رکورد میرود و گرفتن همه یک
|
||||
-- جا اشتباه است، حتما باید پیج نیشن داشته باشد.» Step 1 of
|
||||
-- docs/CATALOG-PAGINATION-PLAN.md: without these, server-side paging would walk
|
||||
-- the same full table scans the unpaged query did.
|
||||
--
|
||||
-- `Product` carried NO index whatsoever, so every GET /catalog/products was a
|
||||
-- sequential scan, and so was each per-product include.
|
||||
--
|
||||
-- IF NOT EXISTS throughout: these run under BOTH migration paths (D15) — the
|
||||
-- Prisma CLI in development and the app's own runner in the deploy image.
|
||||
--
|
||||
-- CREATE INDEX (not CONCURRENTLY): the app's runner wraps each migration in a
|
||||
-- transaction, which CONCURRENTLY cannot join. On a 16k-row table this locks
|
||||
-- writes for a few hundred milliseconds, which is acceptable; a table large
|
||||
-- enough to matter would need the index built by hand outside a migration.
|
||||
|
||||
-- Matches the storefront list exactly: filter isActive, order by createdAt.
|
||||
CREATE INDEX IF NOT EXISTS "Product_isActive_createdAt_idx" ON "Product" ("isActive", "createdAt");
|
||||
|
||||
-- The category and brand filters of the search screen.
|
||||
CREATE INDEX IF NOT EXISTS "Product_categoryId_idx" ON "Product" ("categoryId");
|
||||
CREATE INDEX IF NOT EXISTS "Product_brandId_idx" ON "Product" ("brandId");
|
||||
|
||||
-- `include: { variants: { where: { isActive: true } } }`, once per product.
|
||||
CREATE INDEX IF NOT EXISTS "ProductVariant_productId_isActive_idx" ON "ProductVariant" ("productId", "isActive");
|
||||
|
||||
-- `where: { images: { some: {} } }` plus the gallery ordered by sortOrder.
|
||||
CREATE INDEX IF NOT EXISTS "ProductImage_productId_sortOrder_idx" ON "ProductImage" ("productId", "sortOrder");
|
||||
Reference in New Issue
Block a user