mmm/internal/db/migrations/20240630143204_init.up.sql

26 lines
684 B
MySQL
Raw Permalink Normal View History

2024-06-30 17:27:01 +02:00
CREATE TABLE IF NOT EXISTS track
(
id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY,
path TEXT UNIQUE NOT NULL,
album_artist TEXT NOT NULL,
title TEXT NOT NULL,
album TEXT NOT NULL,
disc INTEGER[][],
year INTEGER NOT NULL,
artist TEXT NOT NULL,
genre TEXT NOT NULL,
lyrics TEXT NOT NULL,
composer TEXT NOT NULL
);
--
-- CREATE TABLE IF NOT EXISTS album
-- (
-- id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY,
-- path TEXT UNIQUE
-- );
CREATE TABLE IF NOT EXISTS artist
(
id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY,
name TEXT UNIQUE
);