Skip to content

Commit

Permalink
feat: add migration tracker table (#578)
Browse files Browse the repository at this point in the history
  • Loading branch information
vasco-santos authored Oct 29, 2021
1 parent c9cd864 commit dc1ce24
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions packages/db/postgres/tables.sql
Original file line number Diff line number Diff line change
Expand Up @@ -175,3 +175,14 @@ CREATE TABLE IF NOT EXISTS pin_sync_request
pin_id BIGINT NOT NULL UNIQUE REFERENCES pin (id),
inserted_at TIMESTAMP WITH TIME ZONE DEFAULT timezone('utc'::text, now()) NOT NULL
);

-- A migration tracker.
CREATE TABLE IF NOT EXISTS migration_tracker
(
id BIGSERIAL PRIMARY KEY,
cid TEXT NOT NULL,
duration BIGINT,
dump_started_at TIMESTAMP WITH TIME ZONE,
dump_ended_at TIMESTAMP WITH TIME ZONE NOT NULL,
inserted_at TIMESTAMP WITH TIME ZONE DEFAULT timezone('utc'::text, now()) NOT NULL
)

0 comments on commit dc1ce24

Please sign in to comment.