Expose list/add/remove gallery endpoints via media_attachments, plus profile title, banner, and category tag/nameFa support needed by the marketplace dashboard. Co-authored-by: Cursor <cursoragent@cursor.com>
14 lines
519 B
SQL
14 lines
519 B
SQL
-- Marketplace / storefront banner image for a business (aspect 18:4.5 ≈ 4:1)
|
|
ALTER TABLE businesses
|
|
ADD COLUMN IF NOT EXISTS banner_media_id BIGINT;
|
|
|
|
ALTER TABLE businesses
|
|
DROP CONSTRAINT IF EXISTS businesses_banner_media_id_fkey;
|
|
|
|
ALTER TABLE businesses
|
|
ADD CONSTRAINT businesses_banner_media_id_fkey
|
|
FOREIGN KEY (banner_media_id) REFERENCES media (id) ON DELETE SET NULL;
|
|
|
|
COMMENT ON COLUMN businesses.banner_media_id IS
|
|
'Optional marketplace/storefront banner; recommended aspect ratio 18:4.5 (4:1).';
|