Files
2026-08-22 16:50:49 +03:30

27 lines
1.4 KiB
SQL

-- مهاجرت WebSocket/montzar → SSE لاراول
-- دیگر نیازی به docker montzar و لایت‌اسپید /prc/ws نیست
-- [super-admin can_edit=0]
-- UPDATE `settings` SET `value` = 'true', `can_edit` = 0, `is_active` = 1,
-- `title_fa` = 'قیمت لحظه‌ای (SSE)',
-- `description` = 'روشن: اپ به /api/price/stream وصل می‌شود؛ خاموش: polling /api/price/last و /customer/product/list'
-- WHERE `key` = 'wss_enabled';
-- [super-admin can_edit=0]
-- INSERT INTO `settings` (`key`, `value`, `title_fa`, `can_edit`, `is_active`, `description`, `type`)
-- SELECT 'sse_path', '/api/price/stream', 'مسیر SSE قیمت', 0, 1,
-- 'مسیر GET لاراول برای استریم last/list — پیش‌فرض /api/price/stream',
-- 'text'
-- WHERE NOT EXISTS (SELECT 1 FROM `settings` WHERE `key` = 'sse_path' LIMIT 1);
-- [super-admin can_edit=0]
-- UPDATE `settings` SET `can_edit` = 0, `is_active` = 0,
-- `title_fa` = 'مسیر WebSocket (منسوخ)',
-- `description` = 'منسوخ — SSE از sse_path استفاده می‌کند. montzar دیگر لازم نیست.'
-- WHERE `key` = 'wss_path';
-- [super-admin can_edit=0]
-- UPDATE `settings` SET `can_edit` = 0, `is_active` = 0,
-- `description` = 'منسوخ — montzar trigger. با SSE دیگر استفاده نمی‌شود.'
-- WHERE `key` IN ('wss_trigger_host', 'wss_http_port', 'wss_socket_port', 'wss_trigger_path', 'wss_link');