-- Migration 0004: Create hall_branches table
-- Applied: 2026-04-24
-- Purpose: Multi-branch support for halls with per-branch Google Maps URLs (Task #138)
-- Note: selected_branch_id is stored in user_settings table (not as a column), so no ALTER needed

CREATE TABLE IF NOT EXISTS "hall_branches" (
  "id" serial PRIMARY KEY,
  "hall_id" integer NOT NULL,
  "name" varchar(200) NOT NULL,
  "google_maps_url" text,
  "created_at" timestamp DEFAULT now()
);

CREATE INDEX IF NOT EXISTS "hall_branches_hall_id_idx" ON "hall_branches" ("hall_id");
