Skip to content

Commit

Permalink
use timestamptz for date fields in db
Browse files Browse the repository at this point in the history
  • Loading branch information
marjisound committed Aug 22, 2023
1 parent 0b5dde0 commit 1f8eaf1
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,17 @@ CREATE TABLE ingestion_events (
"type" TEXT NOT NULL,
status TEXT NOT NULL,
details JSONB,
event_time TIMESTAMP NOT NULL
event_time TIMESTAMPTZ NOT NULL
);
CREATE TABLE blob_metadata (
ingest_id TEXT NOT NULL,
blob_id TEXT NOT NULL,
path TEXT NOT NULL, -- includes file name
file_size BIGINT NOT NULL,
insert_time TIMESTAMP NOT NULL
insert_time TIMESTAMPTZ NOT NULL
);
CREATE INDEX ON ingestion_events (ingest_id, blob_id);
CREATE INDEX ON blob_metadata (ingest_id, blob_id);
CREATE INDEX ON ingestion_events ("type");
CREATE INDEX ON ingestion_events ((details->>'extractorName'));
-- TODO think about indexing details->>'extractors'
-- TODO think about indexing workspace

0 comments on commit 1f8eaf1

Please sign in to comment.