Persists used/second-hand status per listing and supports isUsed=true on business and public store-item queries. Co-authored-by: Cursor <cursoragent@cursor.com>
7 lines
255 B
SQL
7 lines
255 B
SQL
-- Used / second-hand flag on store listings (product-level).
|
|
ALTER TABLE store_items
|
|
ADD COLUMN IF NOT EXISTS is_used BOOLEAN NOT NULL DEFAULT FALSE;
|
|
|
|
CREATE INDEX IF NOT EXISTS idx_store_items_business_is_used
|
|
ON store_items (business_id, is_used);
|