-- =============================================================================
-- STEP 0 — CREATE DATABASE
-- Run this ALONE, connected to the default "postgres" maintenance database
-- (e.g. `psql -U <admin> -d postgres -f 000_create_database.sql`).
--
-- Postgres will not allow CREATE DATABASE inside a transaction block or
-- combined with other statements in the same script — that's why this is a
-- separate file from 001_init_chat_schema.sql, not a stylistic choice.
--
-- This is a deliberately separate physical database from the cart platform's
-- DB (not just a separate schema in the same one) — this service has no
-- relationship to Store/Customer/etc., only to "Application".
-- =============================================================================

CREATE DATABASE chat_bot;

-- After this succeeds, point CHAT_DATABASE_URL at it, e.g.:
--   postgresql://<user>:<password>@<host>:5432/chat_bot
-- then run 001_init_chat_schema.sql against THAT connection.
