We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 28f3d65 commit b147684Copy full SHA for b147684
packages/db/queries/create_new_snapshot.sql
@@ -5,7 +5,8 @@ WITH upd AS (
5
SET metadata = @metadata,
6
sandbox_started_at = @started_at,
7
origin_node_id = @origin_node_id,
8
- auto_pause = @auto_pause
+ auto_pause = @auto_pause,
9
+ updated_at = now()
10
FROM "public"."envs" e
11
WHERE s.sandbox_id = @sandbox_id
12
AND e.id = s.env_id
@@ -22,12 +23,12 @@ WITH upd AS (
22
23
INSERT INTO "public"."snapshots" (
24
sandbox_id, base_env_id, env_id, metadata,
25
sandbox_started_at, env_secure, allow_internet_access,
- origin_node_id, auto_pause
26
+ origin_node_id, auto_pause, updated_at
27
)
28
SELECT
29
@sandbox_id, @base_template_id, id, @metadata,
30
@started_at, @secure, @allow_internet_access,
- @origin_node_id, @auto_pause
31
+ @origin_node_id, @auto_pause, now()
32
FROM ins_env
33
WHERE NOT EXISTS (SELECT 1 FROM upd)
34
RETURNING env_id
packages/db/queries/create_new_snapshot.sql.go
0 commit comments