mirror of
https://git.meshkee.com/Meshkee/backend.git
synced 2026-08-11 22:30:59 +04:30
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>
22 lines
744 B
SQL
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;
|