testing for when resources are nested
[dbsrgits/DBIx-Class-Fixtures.git] / t / lib / mysql.sql
1 -- 
2 -- Table: cd_to_producer
3 --
4 DROP TABLE IF EXISTS cd_to_producer;
5 CREATE TABLE cd_to_producer (
6   cd integer NOT NULL,
7   producer integer NOT NULL,
8   PRIMARY KEY (cd, producer)
9 );
10
11 --
12 -- Table: artist
13 --
14 DROP TABLE IF EXISTS artist;
15 CREATE TABLE artist (
16   artistid INTEGER PRIMARY KEY NOT NULL,
17   name varchar(100)
18 );
19
20 --
21 -- Table: artist_washed_up
22 --
23 DROP TABLE IF EXISTS artist_washed_up;
24 CREATE TABLE artist_washed_up (
25   fk_artistid INTEGER PRIMARY KEY NOT NULL
26 );
27
28 --
29 -- Table: cd
30 --
31 DROP TABLE IF EXISTS cd;
32 CREATE TABLE cd (
33   cdid INTEGER PRIMARY KEY NOT NULL,
34   artist integer NOT NULL,
35   title varchar(100) NOT NULL,
36   year varchar(100) NOT NULL
37 );
38
39 --
40 -- Table: track
41 --
42 DROP TABLE IF EXISTS track;
43 CREATE TABLE track (
44   trackid INTEGER PRIMARY KEY NOT NULL,
45   cd integer NOT NULL,
46   position integer NOT NULL,
47   title varchar(100) NOT NULL,
48   last_updated_on datetime NULL
49 );
50
51 --
52 -- Table: tags
53 --
54 DROP TABLE IF EXISTS tags;
55 CREATE TABLE tags (
56   tagid INTEGER PRIMARY KEY NOT NULL,
57   cd integer NOT NULL,
58   tag varchar(100) NOT NULL
59 );
60
61 --
62 -- Table: producer
63 --
64 DROP TABLE IF EXISTS producer;
65 CREATE TABLE producer (
66   producerid INTEGER PRIMARY KEY NOT NULL,
67   name varchar(100) NOT NULL
68 );