Skip to content

Commit

Permalink
feat: add migration tracker table
Browse files Browse the repository at this point in the history
  • Loading branch information
vasco-santos committed Oct 29, 2021
1 parent cc64654 commit fa8c9db
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 fa8c9db

Please sign in to comment.