archive products

This commit is contained in:
Jake Kasper
2025-09-03 14:39:20 -04:00
parent a0bde7db23
commit 19314b301f
4 changed files with 57 additions and 6 deletions

View File

@@ -0,0 +1,12 @@
-- Add archived flag to products and user_products
ALTER TABLE IF EXISTS products
ADD COLUMN IF NOT EXISTS archived BOOLEAN DEFAULT FALSE;
ALTER TABLE IF EXISTS user_products
ADD COLUMN IF NOT EXISTS archived BOOLEAN DEFAULT FALSE,
ADD COLUMN IF NOT EXISTS updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP;
-- Indexes for filtering
CREATE INDEX IF NOT EXISTS idx_products_archived ON products (archived);
CREATE INDEX IF NOT EXISTS idx_user_products_archived ON user_products (archived);