api/migrations/2023-12-31-104738_artists/up.sql

16 lines
424 B
SQL

-- Your SQL goes here
create table if not exists artists
(
id varchar(24) default nanoid(24),
name varchar(255) NOT NULL,
slug varchar unique not null generated always as (lower(replace(name, ' ', '-'))) stored,
created_at timestamp default now(),
updated_at timestamp,
-- music services
spotify_id varchar(22) unique,
tidal_id varchar(10) unique,
primary key (id)
);