-- Add migration script here
CREATE TABLE IF NOT EXISTS tracks (
    id BIGSERIAL NOT NULL PRIMARY KEY,
    parent INTEGER NOT NULL REFERENCES album(id),
    is_dir BOOLEAN NOT NULL DEFAULT FALSE,
    title TEXT NOT NULL,
    album TEXT,
    artist TEXT,
    track INTEGER,
    year INTEGER,
    genre TEXT,
    cover_art TEXT,
    duration INTEGER,
    path TEXT,
    play_count INTEGER,
    created timestamptz DEFAULT current_timestamp,
    starred timestamptz,
    album_id TEXT,
    artist_id TEXT,
    disc_number INTEGER
)