From 963b41006a3416963811dda36472824c738d6f4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E6=8C=AF?= Date: Tue, 2 Jun 2020 17:31:39 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E9=BB=98=E8=AE=A4=E7=BB=84?= =?UTF-8?q?=E7=BB=87=E3=80=81=E5=B7=A5=E4=BD=9C=E7=A9=BA=E9=97=B4=E5=88=9B?= =?UTF-8?q?=E5=BB=BA=20SQL?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/resources/db/migration/V3__init_data.sql | 14 ++++++++++++++ 1 file changed, 14 insertions(+) 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 3518eb5137..c857ed5825 100644 --- a/backend/src/main/resources/db/migration/V3__init_data.sql +++ b/backend/src/main/resources/db/migration/V3__init_data.sql @@ -15,6 +15,20 @@ VALUES ('test_user', '测试人员', NULL, NULL, 1581576575948, 1581576575948); INSERT INTO role (id, name, description, type, create_time, update_time) VALUES ('test_viewer', 'Viewer', NULL, NULL, 1581576575948, 1581576575948); +INSERT INTO organization (id, name, description, create_time, update_time) +VALUES (uuid(), '默认组织', '系统默认创建的组织', 1581576575948, 1581576575948); +INSERT INTO workspace (id, organization_id, name, description, create_time, update_time) +VALUES (uuid(), (select id from organization where name like '默认组织'), '默认工作空间', '系统默认创建的工作空间', 1581576575948, 1581576575948); +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 '默认组织'), 1581576575948, 1581576575948); +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 '默认工作空间'), 1581576575948, 1581576575948); + +INSERT INTO test_resource_pool (id, name, type, description, status, create_time, update_time) +VALUES (uuid(), 'LOCAL', 'NODE', '系统默认创建的本地资源池', 'VALID', 1581576575948, 1581576575948); +INSERT INTO test_resource (id, test_resource_pool_id, configuration, status, create_time, update_time) +VALUES (uuid(), (select id from test_resource_pool where name like 'LOCAL'), 'GgC8aAZVAsiNDdnvp4gobdv1iwAvloLCAaeqb7Ms1VaLzW+iXHsFhGg8ZaPEk53W6xA5A6g+UUUxbKvU2s7yZw==', 'VALID', 1581576575948, 1581576575948); + INSERT INTO test_case_report_template (id, name, content) VALUES (uuid(), 'default', '{\"components\": [1,2,3,4,5]}'); INSERT INTO system_parameter (param_key, param_value, type, sort)