Files
backend/database/migrations/090_business_banner.sql
T
Alireza HassaniandCursor 3aef62c1b8 Add business gallery API and marketplace profile fields.
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>
2026-09-11 14:41:32 +03:30

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).';