2 drop database if exists soepkiptng;
3 create database soepkiptng;
4 grant select,insert,update,delete,create,drop
6 to soepkiptng identified by 'soepkiptng';
7 grant select,insert,update,delete,create,drop
9 to soepkiptng@localhost identified by 'soepkiptng';
13 id int(11) NOT NULL auto_increment,
14 artist_id int DEFAULT 0 NOT NULL,
15 title varchar(255) DEFAULT '' NOT NULL,
16 album_id int DEFAULT 0 NOT NULL,
17 encoding varchar(255) DEFAULT '' NOT NULL,
18 track int(4) unsigned DEFAULT '0' NOT NULL,
19 filename varchar(255) BINARY DEFAULT '' NOT NULL,
21 length smallint DEFAULT '0' NOT NULL,
23 last_played timestamp,
25 present tinyint NOT NULL,
26 random_pref INT DEFAULT 10000 NOT NULL,
32 KEY artist_id (artist_id),
34 KEY album_id (album_id),
39 id int(11) NOT NULL auto_increment,
40 name varchar(255) DEFAULT '' NOT NULL,
45 id int(11) NOT NULL auto_increment,
46 name varchar(255) DEFAULT '' NOT NULL,
51 song_order int NOT NULL,
58 CREATE TABLE seealso (
64 id int(11) NOT NULL auto_increment,
65 name varchar(255) DEFAULT '' NOT NULL,
70 CREATE TABLE list_contents (
71 song_order int NOT NULL,
73 type ENUM("artist", "album", "song", "list") NOT NULL,
74 entity_id int NOT NULL,
75 UNIQUE (list_id,type,entity_id)
78 CREATE TABLE sessions (
79 id char(32) not null primary key,
93 playtime timestamp NOT NULL,
96 KEY playtime (playtime),
100 CREATE TABLE settings (
101 name varchar(255) not null primary key,
104 INSERT INTO settings (name,value) VALUES ("play_random", 1);