You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A small change that goes through and cleans up SQL a bit by removing
some unnecessary annotations, mostly typecasting that's already implied
by the type of the column where the values are going.
Copy file name to clipboardExpand all lines: riverdriver/riverdatabasesql/migration/main/002_initial_schema.up.sql
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -18,7 +18,7 @@ CREATE TABLE river_job(
18
18
-- looking at jobs with `SELECT *` it'll appear first after ID. The other two
19
19
-- fields aren't as important but are kept adjacent to `state` for alignment
20
20
-- to get an 8-byte block.
21
-
state river_job_state NOT NULL DEFAULT 'available' ::river_job_state,
21
+
state river_job_state NOT NULL DEFAULT 'available',
22
22
attempt smallintNOT NULL DEFAULT 0,
23
23
max_attempts smallintNOT NULL,
24
24
@@ -36,8 +36,8 @@ CREATE TABLE river_job(
36
36
attempted_by text[],
37
37
errors jsonb[],
38
38
kind textNOT NULL,
39
-
metadata jsonb NOT NULL DEFAULT '{}' ::jsonb,
40
-
queue textNOT NULL DEFAULT 'default' ::text,
39
+
metadata jsonb NOT NULL DEFAULT '{}',
40
+
queue textNOT NULL DEFAULT 'default',
41
41
tags varchar(255)[],
42
42
43
43
CONSTRAINT finalized_or_finalized_at_null CHECK ((state IN ('cancelled', 'completed', 'discarded') AND finalized_at IS NOT NULL) OR finalized_at IS NULL),
0 commit comments