-- Product variants table CREATE TABLE product_variants ( id UUID PRIMARY KEY DEFAULT gen_random_uuid(), product_id UUID NOT NULL REFERENCES products(id) ON DELETE CASCADE, name VARCHAR(255) NOT NULL, price_modifier DECIMAL(10,2) DEFAULT 0.00, metadata JSONB DEFAULT '{}', created_at TIMESTAMP WITH TIME ZONE DEFAULT NOW(), updated_at TIMESTAMP WITH TIME ZONE DEFAULT NOW() ); -- Indexes CREATE INDEX idx_product_variants_product_id ON product_variants(product_id); CREATE INDEX idx_product_variants_created_at ON product_variants(created_at);