Update seller store experience

This commit is contained in:
R524809
2026-09-08 16:19:38 +08:00
parent ceb644a3f9
commit 319887726e
25 changed files with 31417 additions and 127 deletions
@@ -0,0 +1,14 @@
SET search_path TO atlas, public;
-- `workspace_id` is the tenant boundary and is never nullable. PostgreSQL's
-- unqualified ON DELETE SET NULL on a composite FK clears every referencing
-- column, including workspace_id. Only the optional variant pointer may be
-- cleared when a re-collected source snapshot replaces its variants.
ALTER TABLE collection_asset_transfers
DROP CONSTRAINT collection_asset_transfers_workspace_id_source_variant_id_fkey;
ALTER TABLE collection_asset_transfers
ADD CONSTRAINT collection_asset_transfers_workspace_id_source_variant_id_fkey
FOREIGN KEY (workspace_id, source_variant_id)
REFERENCES product_variants(workspace_id, id)
ON DELETE SET NULL (source_variant_id);