File: 1-2.sql

package info (click to toggle)
digitaldj 0.7.5-5
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 1,344 kB
  • ctags: 548
  • sloc: sh: 7,376; ansic: 6,265; perl: 495; makefile: 160; sql: 87
file content (58 lines) | stat: -rw-r--r-- 1,362 bytes parent folder | download
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
57
58
#
# Table structure for table 'artist'
#

ALTER TABLE artist ADD date_added date;

#
# Table structure for table 'db_info'
#

CREATE TABLE db_info (
  db_version int(10) unsigned default NULL
) TYPE=MyISAM;

INSERT INTO db_info (db_version) VALUES (2);

#
# Table structure for table 'disc'
#

ALTER TABLE disc ADD date_added date;
ALTER TABLE disc ADD gain_adjustment int;
ALTER TABLE disc MODIFY COLUMN artistid int NOT NULL;
ALTER TABLE disc ADD KEY artistid(artistid);

#
# Table structure for table 'playlist_data'
#

CREATE TABLE playlist_data (
  id int(10) unsigned NOT NULL auto_increment,
  name varchar(255) default NULL,
  type enum('SONG','ARTIST','DISC','GENRE') default 'SONG',
  size int(10) unsigned NOT NULL default '0',
  PRIMARY KEY  (id),
  UNIQUE KEY name (name)
) TYPE=MyISAM;

#
# Table structure for table 'playlist_items'
#

CREATE TABLE playlist_items (
  playlist_id int(10) unsigned NOT NULL default '0',
  item_id int(10) unsigned NOT NULL default '0',
  position int(10) unsigned NOT NULL default '0'
) TYPE=MyISAM;

#
# Table structure for table 'song'
#

ALTER TABLE song ADD date_added date;
ALTER TABLE song ADD gain_adjustment int;
ALTER TABLE song MODIFY COLUMN artistid int NOT NULL;
ALTER TABLE song ADD KEY artistid (artistid);
ALTER TABLE song MODIFY COLUMN discid int NOT NULL;
ALTER TABLE song ADD KEY discid (discid);