-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdb.sql
56 lines (54 loc) · 1.62 KB
/
db.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
CREATE TABLE songs (
id INT PRIMARY KEY AUTO_INCREMENT,
track_id INT UNIQUE,
name VARCHAR(255),
artist VARCHAR(255),
album_artist VARCHAR(255),
composer TEXT,
album VARCHAR(255),
genre VARCHAR(100),
kind VARCHAR(50),
size BIGINT,
total_time INT,
disc_number INT,
disc_count INT,
track_number INT,
track_count INT,
year INT,
date_modified DATETIME,
date_added DATETIME,
play_count INT DEFAULT 0,
play_date BIGINT,
play_date_utc DATETIME,
skip_count INT DEFAULT 0,
skip_date DATETIME,
release_date DATETIME,
favorited BOOLEAN DEFAULT FALSE,
loved BOOLEAN DEFAULT FALSE,
artwork_count INT,
sort_album VARCHAR(255),
sort_artist VARCHAR(255),
sort_name VARCHAR(255),
persistent_id VARCHAR(16),
track_type VARCHAR(50),
protected BOOLEAN,
apple_music BOOLEAN,
location TEXT,
file_folder_count INT,
library_folder_count INT,
INDEX idx_artist (artist),
INDEX idx_album (album),
INDEX idx_genre (genre)
);
INSERT INTO songs (
track_id, name, artist, album_artist, composer, album, genre,
kind, size, total_time, disc_number, disc_count, track_number,
track_count, year, date_modified, date_added, play_count,
play_date, play_date_utc, skip_count, skip_date, release_date,
favorited, loved, artwork_count, sort_album, sort_artist,
sort_name, persistent_id, track_type, protected, apple_music,
location, file_folder_count, library_folder_count
) VALUES (
?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,
?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?
);