api/migrations/2023-12-30-162032_playlists/up.sql

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 not null,
creator_id varchar(24) not null,
created_at timestamp default now(),
updated_at timestamp,
primary key (id),
foreign key (creator_id)
references users (id)
on delete cascade
);