api/migrations/2023-12-30-162032_playlists/up.sql
2024-01-01 03:18:33 +01:00

16 lines
420 B
SQL

create table if not exists playlists
(
id varchar(24) default nanoid(24),
name varchar(255) not null,
public bool default false,
creator_id varchar(24) not null,
created_at timestamp default now() not null,
updated_at timestamp,
primary key (id),
foreign key (creator_id)
references users (id)
on delete cascade
);