From 0357661bf83014ad0f5128fd49ef5a1ea0cbbe98 Mon Sep 17 00:00:00 2001 From: "Captain.B" Date: Thu, 27 May 2021 14:37:40 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=88=9B=E5=BB=BA=E9=BB=98=E8=AE=A4?= =?UTF-8?q?=E7=9A=84=E9=A1=B9=E7=9B=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/resources/db/migration/V3__init_data.sql | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/backend/src/main/resources/db/migration/V3__init_data.sql b/backend/src/main/resources/db/migration/V3__init_data.sql index 5956765a57..16922d9d0c 100644 --- a/backend/src/main/resources/db/migration/V3__init_data.sql +++ b/backend/src/main/resources/db/migration/V3__init_data.sql @@ -19,11 +19,18 @@ VALUES ('test_viewer', 'Viewer', NULL, NULL, unix_timestamp() * 1000, unix_times INSERT INTO organization (id, name, description, create_time, update_time) VALUES (uuid(), '默认组织', '系统默认创建的组织', unix_timestamp() * 1000, unix_timestamp() * 1000); INSERT INTO workspace (id, organization_id, name, description, create_time, update_time) -VALUES (uuid(), (SELECT id FROM organization WHERE name LIKE '默认组织'), '默认工作空间', '系统默认创建的工作空间', unix_timestamp() * 1000, unix_timestamp() * 1000); +VALUES (uuid(), (SELECT id FROM organization WHERE name LIKE '默认组织'), '默认工作空间', '系统默认创建的工作空间', unix_timestamp() * 1000, + unix_timestamp() * 1000); +INSERT INTO project (id, workspace_id, name, description, create_time, update_time) +VALUES (uuid(), (SELECT id FROM workspace WHERE name LIKE '默认工作空间'), '默认项目', '系统默认创建的项目', unix_timestamp() * 1000, + unix_timestamp() * 1000); + INSERT INTO user_role (id, user_id, role_id, source_id, create_time, update_time) -VALUES (uuid(), 'admin', 'org_admin', (SELECT id FROM organization WHERE name LIKE '默认组织'), unix_timestamp() * 1000, unix_timestamp() * 1000); +VALUES (uuid(), 'admin', 'org_admin', (SELECT id FROM organization WHERE name LIKE '默认组织'), unix_timestamp() * 1000, + unix_timestamp() * 1000); INSERT INTO user_role (id, user_id, role_id, source_id, create_time, update_time) -VALUES (uuid(), 'admin', 'test_manager', (SELECT id FROM workspace WHERE name LIKE '默认工作空间'), unix_timestamp() * 1000, unix_timestamp() * 1000); +VALUES (uuid(), 'admin', 'test_manager', (SELECT id FROM workspace WHERE name LIKE '默认工作空间'), unix_timestamp() * 1000, + unix_timestamp() * 1000); INSERT INTO test_resource_pool (id, name, type, description, status, create_time, update_time) VALUES (uuid(), 'LOCAL', 'NODE', '系统默认创建的本地资源池', 'VALID', unix_timestamp() * 1000, unix_timestamp() * 1000);