From 97b82520aacacbe600c8918b26b5b29b8d47d4d1 Mon Sep 17 00:00:00 2001 From: Kjetil Orbekk Date: Tue, 4 Feb 2020 19:58:15 -0500 Subject: Add entry table and link with raw data --- migrations/2020-02-04-150559_entry/down.sql | 1 + migrations/2020-02-04-150559_entry/up.sql | 9 +++++++++ 2 files changed, 10 insertions(+) create mode 100644 migrations/2020-02-04-150559_entry/down.sql create mode 100644 migrations/2020-02-04-150559_entry/up.sql (limited to 'migrations/2020-02-04-150559_entry') diff --git a/migrations/2020-02-04-150559_entry/down.sql b/migrations/2020-02-04-150559_entry/down.sql new file mode 100644 index 0000000..ca787a3 --- /dev/null +++ b/migrations/2020-02-04-150559_entry/down.sql @@ -0,0 +1 @@ +drop table entries; diff --git a/migrations/2020-02-04-150559_entry/up.sql b/migrations/2020-02-04-150559_entry/up.sql new file mode 100644 index 0000000..122dec7 --- /dev/null +++ b/migrations/2020-02-04-150559_entry/up.sql @@ -0,0 +1,9 @@ +create table entries ( + username varchar not null references users(username), + entry_type varchar(16) not null, + id bigserial not null, + timestamp timestamptz, + payload jsonb not null, + + primary key(username, entry_type, id) +); -- cgit v1.2.3