Skip to content

Commit

Permalink
timestamptz, use json
Browse files Browse the repository at this point in the history
  • Loading branch information
serprex committed Jan 31, 2024
1 parent 45bd19e commit 15b9be2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions flow/connectors/external_metadata/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ func (p *PostgresMetadataStore) SetupMetadata() error {
CREATE TABLE IF NOT EXISTS `+p.QualifyTable(lastSyncStateTableName)+`(
job_name TEXT PRIMARY KEY NOT NULL,
last_offset BIGINT NOT NULL,
updated_at TIMESTAMP NOT NULL DEFAULT NOW(),
updated_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
sync_batch_id BIGINT NOT NULL,
normalize_batch_id BIGINT
)`)
Expand All @@ -137,9 +137,9 @@ func (p *PostgresMetadataStore) SetupMetadata() error {
CREATE TABLE IF NOT EXISTS `+p.QualifyTable(qrepTableName)+`(
job_name TEXT NOT NULL,
partition_id TEXT NOT NULL,
sync_partition TEXT NOT NULL,
sync_start_time TIMESTAMP NOT NULL,
sync_finish_time TIMESTAMP NOT NULL DEFAULT NOW()
sync_partition JSON NOT NULL,
sync_start_time TIMESTAMPTZ NOT NULL,
sync_finish_time TIMESTAMPTZ NOT NULL DEFAULT NOW()
)`)
if err != nil && !utils.IsUniqueError(err) {
p.logger.Error("failed to create qrep metadata table", slog.Any("error", err))
Expand Down

0 comments on commit 15b9be2

Please sign in to comment.