Files
ai-showcase-platform/scripts/manual-insert-virtual-apps.sql
2025-09-19 18:36:35 +08:00

55 lines
1.2 KiB
SQL
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

-- =====================================================
-- 手動新增虛擬應用記錄用於團隊評分
-- =====================================================
-- 首先查看現有的團隊數據
SELECT id, name FROM teams WHERE is_active = 1;
-- 為每個團隊創建對應的虛擬應用記錄
-- 格式team_{teamId} 以便識別這是團隊評分
-- 團隊 1: aaa (ID: t1757702332911zcl6iafq1)
INSERT INTO apps (
id,
name,
description,
creator_id,
category,
type,
app_url,
icon,
icon_color,
likes_count,
views_count,
rating,
is_active,
created_at,
updated_at
) VALUES (
'team_t1757702332911zcl6iafq1',
'[團隊評分] aaa',
'團隊 aaa 的評分記錄',
'00000000-0000-0000-0000-000000000000',
'team_scoring',
'team',
NULL,
'Users',
'from-gray-500 to-gray-600',
0,
0,
0.00,
1,
NOW(),
NOW()
);
-- 如果有其他團隊,請按照相同格式添加
-- 團隊 2: (如果有的話)
-- INSERT INTO apps (...) VALUES (...);
-- 驗證插入結果
SELECT id, name, type, category FROM apps WHERE id LIKE 'team_%';
-- 檢查外鍵約束是否解決
-- 現在可以嘗試插入團隊評分記錄