api/migrations/2023-12-30-192105_tracks/up.sql

17 lines
402 B
MySQL
Raw Permalink Normal View History

2023-12-31 00:21:07 +00:00
-- Your SQL goes here
2024-01-01 02:18:33 +00:00
create table if not exists tracks
2023-12-31 00:21:07 +00:00
(
2024-01-01 02:18:33 +00:00
id varchar(24) default nanoid(24),
title varchar(255) not null,
duration_ms int not null default 0,
2023-12-31 00:21:07 +00:00
2024-01-01 22:58:26 +00:00
created_at timestamp default now(),
2024-01-01 02:18:33 +00:00
updated_at timestamp,
2023-12-31 00:21:07 +00:00
-- music services
2024-01-01 22:58:26 +00:00
spotify_id varchar(22) unique,
2024-01-01 02:18:33 +00:00
tidal_id varchar(10) unique,
2023-12-31 00:21:07 +00:00
2024-01-01 02:18:33 +00:00
primary key (id)
2023-12-31 00:21:07 +00:00
);