2024-01-01 02:18:33 +00:00
|
|
|
create table if not exists playlists
|
2023-12-31 00:21:07 +00:00
|
|
|
(
|
2024-01-01 02:18:33 +00:00
|
|
|
id varchar(24) default nanoid(24),
|
|
|
|
name varchar(255) not null,
|
|
|
|
public bool default false,
|
2023-12-31 00:21:07 +00:00
|
|
|
|
2024-01-01 02:18:33 +00:00
|
|
|
creator_id varchar(24) not null,
|
2023-12-31 00:21:07 +00:00
|
|
|
|
2024-01-01 02:18:33 +00:00
|
|
|
created_at timestamp default now() not null,
|
|
|
|
updated_at timestamp,
|
2023-12-31 00:21:07 +00:00
|
|
|
|
2024-01-01 02:18:33 +00:00
|
|
|
primary key (id),
|
|
|
|
foreign key (creator_id)
|
|
|
|
references users (id)
|
|
|
|
on delete cascade
|
2023-12-31 00:21:07 +00:00
|
|
|
);
|