@@ -6,28 +6,29 @@ VALUES ('d3fd38d2-ffc3-4ec2-8cfc-9c8dab6d9a74', 'Test Org', 'Test Organization',
6
6
INSERT INTO users (id, email, username, created_at, updated_at, status, rbac_roles, login_type, hashed_password)
7
7
VALUES (
' 1f573504-f7a0-4498-8b81-2e1939f3c4a2' ,
' [email protected] ' ,
' testuser' , now(), now(),
' active' ,
' {}' ,
' password' ,
' password' );
8
8
9
- -- Template
10
- INSERT INTO templates (id, created_by, organization_id, created_at, updated_at, deleted, name, provisioner, active_version_id, description )
11
- VALUES (' 0bd0713b-176a-4864-a58b-546a1b021025 ' , ' 1f573504-f7a0-4498-8b81-2e1939f3c4a2 ' , ' d3fd38d2-ffc3-4ec2-8cfc-9c8dab6d9a74' , now(), now(), false , ' test-template ' , ' terraform ' , null , ' Test template ' );
9
+ -- Provisioner Job
10
+ INSERT INTO provisioner_jobs (id, organization_id, created_at, updated_at, initiator_id, provisioner, storage_method, type, input, file_id )
11
+ VALUES (' 50ebe702-82e5-4053-859d-c24a3b742b57 ' , ' d3fd38d2-ffc3-4ec2-8cfc-9c8dab6d9a74' , now(), now(), ' 1f573504-f7a0-4498-8b81-2e1939f3c4a2 ' , ' echo ' , ' file ' , ' template_version_import ' , ' {} ' , ' 00000000-82e5-4053-859d-c24a3b742b57 ' );
12
12
13
13
-- Template Version
14
- INSERT INTO template_versions (id, template_id, organization_id, created_by, created_at, updated_at, name, job_id, readme, message)
15
- VALUES (' f1276e15-01cd-406d-8ea5-64f113a79601' , ' 0bd0713b-176a-4864-a58b-546a1b021025' , ' d3fd38d2-ffc3-4ec2-8cfc-9c8dab6d9a74' , ' 1f573504-f7a0-4498-8b81-2e1939f3c4a2' , now(), now(), ' test-version' , null , ' ' , ' ' );
14
+ INSERT INTO template_versions (id, organization_id, created_by, created_at, updated_at, name, job_id, readme, message)
15
+ VALUES (' f1276e15-01cd-406d-8ea5-64f113a79601' , ' d3fd38d2-ffc3-4ec2-8cfc-9c8dab6d9a74' , ' 1f573504-f7a0-4498-8b81-2e1939f3c4a2' , now(), now(), ' test-version' , ' 50ebe702-82e5-4053-859d-c24a3b742b57' , ' ' , ' ' );
16
+
17
+ -- Template
18
+ INSERT INTO templates (id, created_by, organization_id, created_at, updated_at, deleted, name, provisioner, active_version_id, description)
19
+ VALUES (' 0bd0713b-176a-4864-a58b-546a1b021025' , ' 1f573504-f7a0-4498-8b81-2e1939f3c4a2' , ' d3fd38d2-ffc3-4ec2-8cfc-9c8dab6d9a74' , now(), now(), false, ' test-template' , ' terraform' , ' f1276e15-01cd-406d-8ea5-64f113a79601' , ' Test template' );
16
20
21
+ UPDATE templates SET active_version_id = ' f1276e15-01cd-406d-8ea5-64f113a79601' WHERE id = ' 0bd0713b-176a-4864-a58b-546a1b021025' ;
17
22
-- Workspace
18
23
INSERT INTO workspaces (id, organization_id, owner_id, template_id, created_at, updated_at, name, deleted, automatic_updates)
19
24
VALUES (' 8cb0b7c4-47b5-4bfc-ad92-88ccc61f3c12' , ' d3fd38d2-ffc3-4ec2-8cfc-9c8dab6d9a74' , ' 1f573504-f7a0-4498-8b81-2e1939f3c4a2' , ' 0bd0713b-176a-4864-a58b-546a1b021025' , now(), now(), ' test-workspace' , false, ' never' );
20
25
21
- -- Provisioner Job
22
- INSERT INTO provisioner_jobs (id, organization_id, created_at, updated_at, status, worker_id, error, started_at)
23
- VALUES (' 50ebe702-82e5-4053-859d-c24a3b742b57' , ' d3fd38d2-ffc3-4ec2-8cfc-9c8dab6d9a74' , now(), now(), ' pending' , null , null , null );
24
-
25
26
-- Workspace Build
26
- INSERT INTO workspace_builds (id, workspace_id, template_version_id, initiator_id, job_id, created_at, updated_at, transition, reason)
27
- VALUES (' 83b28647-743c-4649-b226-f2be697ca06c' , ' 8cb0b7c4-47b5-4bfc-ad92-88ccc61f3c12' , ' f1276e15-01cd-406d-8ea5-64f113a79601' , ' 1f573504-f7a0-4498-8b81-2e1939f3c4a2' , ' 50ebe702-82e5-4053-859d-c24a3b742b57' , now(), now(), ' start' , ' initiator' );
27
+ INSERT INTO workspace_builds (id, workspace_id, template_version_id, initiator_id, job_id, created_at, updated_at, transition, reason, build_number )
28
+ VALUES (' 83b28647-743c-4649-b226-f2be697ca06c' , ' 8cb0b7c4-47b5-4bfc-ad92-88ccc61f3c12' , ' f1276e15-01cd-406d-8ea5-64f113a79601' , ' 1f573504-f7a0-4498-8b81-2e1939f3c4a2' , ' 50ebe702-82e5-4053-859d-c24a3b742b57' , now(), now(), ' start' , ' initiator' , 45 );
28
29
29
30
-- Template Version Presets
30
- INSERT INTO template_version_presets (id, template_version_id, name, created_at, updated_at, description )
31
+ INSERT INTO template_version_presets (id, template_version_id, name, created_at)
31
32
VALUES
32
- (' 575a0fbb-cc3e-4709-ae9f-d1a3f365909c' , ' f1276e15-01cd-406d-8ea5-64f113a79601' , ' test' , now(), now(), ' Test preset ' ),
33
- (' 2c76596d-436d-42eb-a38c-8d5a70497030' , ' f1276e15-01cd-406d-8ea5-64f113a79601' , ' test' , now(), now(), ' Test preset ' );
33
+ (' 575a0fbb-cc3e-4709-ae9f-d1a3f365909c' , ' f1276e15-01cd-406d-8ea5-64f113a79601' , ' test' , now()),
34
+ (' 2c76596d-436d-42eb-a38c-8d5a70497030' , ' f1276e15-01cd-406d-8ea5-64f113a79601' , ' test' , now());
0 commit comments