finish postgres
This commit is contained in:
parent
7b7e1a4014
commit
08e24f63f4
16 changed files with 454 additions and 306 deletions
|
@ -47,3 +47,12 @@ CREATE TABLE IF NOT EXISTS events (
|
|||
);
|
||||
|
||||
SELECT create_hypertable('events', by_range('time'));
|
||||
|
||||
CREATE TABLE IF NOT EXISTS playlist (
|
||||
id UUID NOT NULL PRIMARY KEY DEFAULT gen_random_uuid(),
|
||||
owner VARCHAR(255) NOT NULL,
|
||||
title text NOT NULL,
|
||||
visibility text NOT NULL DEFAULT 'private' CHECK (visibility IN ('public', 'private')),
|
||||
tracks UUID[] NOT NULL DEFAULT [],
|
||||
FOREIGN KEY(owner) REFERENCES user(username)
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue