Skip to content

Commit 19c2a10

Browse files
committed
chore: merge related migrations into one
1 parent 5dd68b1 commit 19c2a10

7 files changed

Lines changed: 4 additions & 14 deletions

backend/src/database/migrations/U1771597150__addExportedAtToSnowflakeExport.sql

Whitespace-only changes.

backend/src/database/migrations/U1771601622__addUniqueS3PathToSnowflakeExport.sql

Whitespace-only changes.

backend/src/database/migrations/U1771605060__addMetricsToSnowflakeExport.sql

Whitespace-only changes.
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
CREATE TABLE integration."snowflakeExportJobs" (
22
id BIGSERIAL PRIMARY KEY,
33
platform VARCHAR(100) NOT NULL,
4-
s3_path TEXT NOT NULL,
5-
"totalRows" BIGINT NOT NULL DEFAULT 0,
6-
"totalBytes" BIGINT NOT NULL DEFAULT 0,
4+
s3_path TEXT NOT NULL UNIQUE,
5+
metrics JSONB,
76
"createdAt" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW(),
87
"updatedAt" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW(),
98
"processingStartedAt" TIMESTAMP WITH TIME ZONE, -- set when worker claims job (acts as lock)
9+
"exportStartedAt" TIMESTAMP WITH TIME ZONE,
1010
"completedAt" TIMESTAMP WITH TIME ZONE,
1111
"cleanedAt" TIMESTAMP WITH TIME ZONE,
1212
error TEXT
1313
);
1414

1515
CREATE INDEX "idx_snowflakeExportJobs_platform" ON integration."snowflakeExportJobs" (platform);
16-
CREATE INDEX "idx_snowflakeExportJobs_pending" ON integration."snowflakeExportJobs" ("createdAt")
16+
CREATE INDEX "idx_snowflakeExportJobs_pending" ON integration."snowflakeExportJobs" ("createdAt")
1717
WHERE "processingStartedAt" IS NULL;

backend/src/database/migrations/V1771597150__addExportedAtToSnowflakeExport.sql

Lines changed: 0 additions & 2 deletions
This file was deleted.

backend/src/database/migrations/V1771601622__addUniqueS3PathToSnowflakeExport.sql

Lines changed: 0 additions & 2 deletions
This file was deleted.

backend/src/database/migrations/V1771605060__addMetricsToSnowflakeExport.sql

Lines changed: 0 additions & 6 deletions
This file was deleted.

0 commit comments

Comments
 (0)