summaryrefslogtreecommitdiffstats
path: root/create_rating.sql
blob: 470997fd5d5691a6a054d969b84d67ec6359fa78 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
create table if not exists tracks(
    date varchar(12) not null,
    artist varchar(255) not null,
    album varchar(255) not null,
    title varchar(255) not null,
    trackbumber smallint not null,
    rating smallint not null
);
create index if not exists track_ratings_idx ON tracks (rating);
CREATE UNIQUE INDEX tracks_title_idx ON tracks (title);

create table if not exists albums(
    date varchar(12) not null,
    artist varchar(255) not null,
    album varchar(255) not null,
    rating smallint not null
);
create index if not exists album_ratings_idx ON albums (rating);
CREATE UNIQUE INDEX albums_dir_idx ON albums (album);