diff options
Diffstat (limited to 'migrations/2020-02-04-150559_entry')
| -rw-r--r-- | migrations/2020-02-04-150559_entry/down.sql | 1 | ||||
| -rw-r--r-- | migrations/2020-02-04-150559_entry/up.sql | 9 |
2 files changed, 10 insertions, 0 deletions
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) +); |
