Remove anonymous blesses to avoid major speed hit on Fedora Core 5, or 'the anti...
[dbsrgits/DBIx-Class.git] / t / lib / sqlite.sql
CommitLineData
0009fa49 1--
2-- Created by SQL::Translator::Producer::SQLite
d56d8619 3-- Created on Sun Jul 23 00:23:30 2006
0009fa49 4--
5BEGIN TRANSACTION;
6
7--
38e48163 8-- Table: employee
4e298a80 9--
38e48163 10CREATE TABLE employee (
4e298a80 11 employee_id INTEGER PRIMARY KEY NOT NULL,
12 position integer NOT NULL,
13 group_id integer,
14 name varchar(100)
15);
16
17--
8fcf21b3 18-- Table: serialized
19--
20CREATE TABLE serialized (
21 id INTEGER PRIMARY KEY NOT NULL,
22 serialized text NOT NULL
23);
24
25--
8fcf21b3 26-- Table: liner_notes
27--
28CREATE TABLE liner_notes (
29 liner_id INTEGER PRIMARY KEY NOT NULL,
30 notes varchar(100) NOT NULL
31);
32
33--
0009fa49 34-- Table: cd_to_producer
35--
36CREATE TABLE cd_to_producer (
37 cd integer NOT NULL,
38 producer integer NOT NULL,
39 PRIMARY KEY (cd, producer)
40);
41
42--
43-- Table: artist
44--
45CREATE TABLE artist (
46 artistid INTEGER PRIMARY KEY NOT NULL,
8fcf21b3 47 name varchar(100)
0009fa49 48);
49
50--
9c2c91ea 51-- Table: twokeytreelike
52--
53CREATE TABLE twokeytreelike (
54 id1 integer NOT NULL,
55 id2 integer NOT NULL,
56 parent1 integer NOT NULL,
57 parent2 integer NOT NULL,
58 name varchar(100) NOT NULL,
59 PRIMARY KEY (id1, id2)
60);
61
62--
3bd6e3e0 63-- Table: fourkeys_to_twokeys
64--
65CREATE TABLE fourkeys_to_twokeys (
66 f_foo integer NOT NULL,
67 f_bar integer NOT NULL,
68 f_hello integer NOT NULL,
69 f_goodbye integer NOT NULL,
70 t_artist integer NOT NULL,
71 t_cd integer NOT NULL,
72 autopilot character NOT NULL,
73 PRIMARY KEY (f_foo, f_bar, f_hello, f_goodbye, t_artist, t_cd)
74);
75
76--
0009fa49 77-- Table: self_ref_alias
78--
79CREATE TABLE self_ref_alias (
80 self_ref integer NOT NULL,
887ce227 81 alias integer NOT NULL,
82 PRIMARY KEY (self_ref, alias)
0009fa49 83);
84
85--
0009fa49 86-- Table: cd
87--
88CREATE TABLE cd (
89 cdid INTEGER PRIMARY KEY NOT NULL,
90 artist integer NOT NULL,
8fcf21b3 91 title varchar(100) NOT NULL,
92 year varchar(100) NOT NULL
0009fa49 93);
94
95--
9c2c91ea 96-- Table: bookmark
0009fa49 97--
9c2c91ea 98CREATE TABLE bookmark (
0009fa49 99 id INTEGER PRIMARY KEY NOT NULL,
9c2c91ea 100 link integer NOT NULL
0009fa49 101);
102
103--
104-- Table: track
105--
106CREATE TABLE track (
107 trackid INTEGER PRIMARY KEY NOT NULL,
108 cd integer NOT NULL,
109 position integer NOT NULL,
8fcf21b3 110 title varchar(100) NOT NULL
0009fa49 111);
112
113--
3bd6e3e0 114-- Table: self_ref
887ce227 115--
3bd6e3e0 116CREATE TABLE self_ref (
887ce227 117 id INTEGER PRIMARY KEY NOT NULL,
8fcf21b3 118 name varchar(100) NOT NULL
887ce227 119);
120
9fcda149 121--
9c2c91ea 122-- Table: link
1c339d71 123--
9c2c91ea 124CREATE TABLE link (
125 id INTEGER PRIMARY KEY NOT NULL,
126 url varchar(100),
127 title varchar(100)
128);
129
130--
3bd6e3e0 131-- Table: tags
9c2c91ea 132--
3bd6e3e0 133CREATE TABLE tags (
134 tagid INTEGER PRIMARY KEY NOT NULL,
135 cd integer NOT NULL,
136 tag varchar(100) NOT NULL
9c2c91ea 137);
138
139--
140-- Table: treelike
141--
142CREATE TABLE treelike (
143 id INTEGER PRIMARY KEY NOT NULL,
144 parent integer NOT NULL,
8fcf21b3 145 name varchar(100) NOT NULL
0009fa49 146);
147
148--
f86fcf0d 149-- Table: event
0009fa49 150--
f86fcf0d 151CREATE TABLE event (
152 id INTEGER PRIMARY KEY NOT NULL,
c03ccdbc 153 starts_at datetime NOT NULL,
154 created_on timestamp NOT NULL
0009fa49 155);
156
887ce227 157--
9c2c91ea 158-- Table: twokeys
887ce227 159--
9c2c91ea 160CREATE TABLE twokeys (
161 artist integer NOT NULL,
162 cd integer NOT NULL,
163 PRIMARY KEY (artist, cd)
164);
165
166--
167-- Table: fourkeys
168--
169CREATE TABLE fourkeys (
170 foo integer NOT NULL,
171 bar integer NOT NULL,
172 hello integer NOT NULL,
173 goodbye integer NOT NULL,
3bd6e3e0 174 sensors character NOT NULL,
9c2c91ea 175 PRIMARY KEY (foo, bar, hello, goodbye)
176);
177
178--
179-- Table: artist_undirected_map
180--
181CREATE TABLE artist_undirected_map (
182 id1 integer NOT NULL,
183 id2 integer NOT NULL,
184 PRIMARY KEY (id1, id2)
185);
186
187--
188-- Table: producer
189--
190CREATE TABLE producer (
191 producerid INTEGER PRIMARY KEY NOT NULL,
8fcf21b3 192 name varchar(100) NOT NULL
887ce227 193);
194
9fcda149 195--
9c2c91ea 196-- Table: onekey
9fcda149 197--
9c2c91ea 198CREATE TABLE onekey (
8fcf21b3 199 id INTEGER PRIMARY KEY NOT NULL,
9c2c91ea 200 artist integer NOT NULL,
201 cd integer NOT NULL
9fcda149 202);
203
38e48163 204CREATE UNIQUE INDEX tktlnameunique_twokeytreelike on twokeytreelike (name);
368a5228 205CREATE UNIQUE INDEX cd_artist_title_cd on cd (artist, title);
365d06b7 206CREATE UNIQUE INDEX track_cd_position_track on track (cd, position);
207CREATE UNIQUE INDEX track_cd_title_track on track (cd, title);
368a5228 208CREATE UNIQUE INDEX prod_name_producer on producer (name);
0009fa49 209COMMIT;