initial commit
This commit is contained in:
commit
8a19a733d6
35 changed files with 2489 additions and 0 deletions
2
migrations/2023-12-30-192105_tracks/down.sql
Normal file
2
migrations/2023-12-30-192105_tracks/down.sql
Normal file
|
@ -0,0 +1,2 @@
|
|||
-- This file should undo anything in `up.sql`
|
||||
DROP TABLE tracks;
|
16
migrations/2023-12-30-192105_tracks/up.sql
Normal file
16
migrations/2023-12-30-192105_tracks/up.sql
Normal file
|
@ -0,0 +1,16 @@
|
|||
-- Your SQL goes here
|
||||
CREATE TABLE IF NOT EXISTS tracks
|
||||
(
|
||||
id VARCHAR(24) DEFAULT nanoid(24),
|
||||
title VARCHAR(255) NOT NULL,
|
||||
duration_ms INT NOT NULL DEFAULT 0,
|
||||
|
||||
created_at TIMESTAMP DEFAULT now() NOT NULL,
|
||||
updated_at TIMESTAMP,
|
||||
|
||||
-- music services
|
||||
spotify_id VARCHAR(21) UNIQUE,
|
||||
tidal_id VARCHAR(10) UNIQUE,
|
||||
|
||||
PRIMARY KEY (id)
|
||||
);
|
Loading…
Add table
Add a link
Reference in a new issue