Files
backend/database/migrations/051_domain_deploy_slug.sql
Alireza HassaniandCursor d933aef40b Enable storefront provision from Add Domain via optional git URL.
Persist deploy_slug on domains, call the websites agent /provision endpoint, and drop the hard-coded host map so Deploy appears from the UI.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-08 14:07:56 +03:30

22 lines
744 B
SQL

-- Storefront deploy wiring (Super Admin Add Domain + git URL)
ALTER TABLE domains
ADD COLUMN IF NOT EXISTS deploy_slug VARCHAR(64),
ADD COLUMN IF NOT EXISTS git_repo_url VARCHAR(512);
CREATE UNIQUE INDEX IF NOT EXISTS domains_deploy_slug_unique
ON domains (deploy_slug)
WHERE deploy_slug IS NOT NULL;
-- Existing websites VM sites
UPDATE domains
SET deploy_slug = 'ali-mohammadi',
git_repo_url = COALESCE(git_repo_url, 'git@git.meshkee.com:Meshkee-Websites/ali-mohammadi.git')
WHERE host = 'ali-mohammadi.ir'
AND deploy_slug IS NULL;
UPDATE domains
SET deploy_slug = 'meshkee',
git_repo_url = COALESCE(git_repo_url, 'git@git.meshkee.com:Meshkee-Websites/meshkee.git')
WHERE host = 'meshkee.com'
AND deploy_slug IS NULL;