Files
backend/database/migrations/021_business_customer_is_enabled.sql
Ali Reza bb59d5e9ba Initial commit: Meshkee CMS API
NestJS backend with Prisma, Docker Compose for Postgres/Redis, and deploy docs for the production VM.
2026-07-21 17:52:36 +03:30

7 lines
302 B
SQL

-- Business-scoped customer enable/disable (does not deactivate the global user account)
ALTER TABLE business_customers
ADD COLUMN IF NOT EXISTS is_enabled BOOLEAN NOT NULL DEFAULT TRUE;
CREATE INDEX IF NOT EXISTS idx_business_customers_is_enabled
ON business_customers (business_id, is_enabled);