2 -- Created by SQL::Translator::Producer::SQLite
3 -- Created on Mon Nov 17 02:53:11 2008
12 artistid INTEGER PRIMARY KEY NOT NULL,
14 rank integer NOT NULL DEFAULT '13',
20 -- Table: artist_undirected_map
22 CREATE TABLE artist_undirected_map (
25 PRIMARY KEY (id1, id2)
28 CREATE INDEX artist_undirected_map_idx_id1_ ON artist_undirected_map (id1);
29 CREATE INDEX artist_undirected_map_idx_id2_ ON artist_undirected_map (id2);
34 CREATE TABLE cd_artwork (
35 cd_id INTEGER PRIMARY KEY NOT NULL
38 CREATE INDEX cd_artwork_idx_cd_id_cd_artwor ON cd_artwork (cd_id);
43 CREATE TABLE bookmark (
44 id INTEGER PRIMARY KEY NOT NULL,
48 CREATE INDEX bookmark_idx_link_bookmark ON bookmark (link);
54 id INTEGER PRIMARY KEY NOT NULL,
55 source varchar(100) NOT NULL,
56 owner integer NOT NULL,
57 title varchar(100) NOT NULL,
66 cdid INTEGER PRIMARY KEY NOT NULL,
67 artist integer NOT NULL,
68 title varchar(100) NOT NULL,
69 year varchar(100) NOT NULL,
74 CREATE INDEX cd_idx_artist_cd ON cd (artist);
75 CREATE INDEX cd_idx_genreid_cd ON cd (genreid);
76 CREATE INDEX cd_idx_single_track_cd ON cd (single_track);
77 CREATE UNIQUE INDEX cd_artist_title_cd ON cd (artist, title);
80 -- Table: cd_to_producer
82 CREATE TABLE cd_to_producer (
84 producer integer NOT NULL,
85 PRIMARY KEY (cd, producer)
88 CREATE INDEX cd_to_producer_idx_cd_cd_to_pr ON cd_to_producer (cd);
89 CREATE INDEX cd_to_producer_idx_producer_cd ON cd_to_producer (producer);
94 CREATE TABLE collection (
95 collectionid INTEGER PRIMARY KEY NOT NULL,
96 name varchar(100) NOT NULL
101 -- Table: collection_object
103 CREATE TABLE collection_object (
104 collection integer NOT NULL,
105 object integer NOT NULL,
106 PRIMARY KEY (collection, object)
109 CREATE INDEX collection_object_idx_collection_collection_obj ON collection_object (collection);
110 CREATE INDEX collection_object_idx_object_c ON collection_object (object);
115 CREATE TABLE employee (
116 employee_id INTEGER PRIMARY KEY NOT NULL,
117 position integer NOT NULL,
128 id INTEGER PRIMARY KEY NOT NULL,
129 starts_at datetime NOT NULL,
130 created_on timestamp NOT NULL,
131 varchar_date varchar(20),
132 varchar_datetime varchar(20),
133 skip_inflation datetime
138 -- Table: file_columns
140 CREATE TABLE file_columns (
141 id INTEGER PRIMARY KEY NOT NULL,
142 file varchar(255) NOT NULL
147 -- Table: forceforeign
149 CREATE TABLE forceforeign (
150 artist INTEGER PRIMARY KEY NOT NULL,
154 CREATE INDEX forceforeign_idx_artist_forcef ON forceforeign (artist);
159 CREATE TABLE fourkeys (
160 foo integer NOT NULL,
161 bar integer NOT NULL,
162 hello integer NOT NULL,
163 goodbye integer NOT NULL,
164 sensors character NOT NULL,
165 PRIMARY KEY (foo, bar, hello, goodbye)
170 -- Table: fourkeys_to_twokeys
172 CREATE TABLE fourkeys_to_twokeys (
173 f_foo integer NOT NULL,
174 f_bar integer NOT NULL,
175 f_hello integer NOT NULL,
176 f_goodbye integer NOT NULL,
177 t_artist integer NOT NULL,
178 t_cd integer NOT NULL,
179 autopilot character NOT NULL,
180 PRIMARY KEY (f_foo, f_bar, f_hello, f_goodbye, t_artist, t_cd)
183 CREATE INDEX fourkeys_to_twokeys_idx_f_foo_f_bar_f_hello_f_goodbye_ ON fourkeys_to_twokeys (f_foo, f_bar, f_hello, f_goodbye);
184 CREATE INDEX fourkeys_to_twokeys_idx_t_artist_t_cd_fourkeys_to ON fourkeys_to_twokeys (t_artist, t_cd);
190 genreid INTEGER PRIMARY KEY NOT NULL,
191 name varchar(100) NOT NULL
194 CREATE UNIQUE INDEX genre_name_genre ON genre (name);
199 CREATE TABLE images (
200 id INTEGER PRIMARY KEY NOT NULL,
201 artwork_id integer NOT NULL,
202 name varchar(100) NOT NULL,
206 CREATE INDEX images_idx_artwork_id_images ON images (artwork_id);
209 -- Table: liner_notes
211 CREATE TABLE liner_notes (
212 liner_id INTEGER PRIMARY KEY NOT NULL,
213 notes varchar(100) NOT NULL
216 CREATE INDEX liner_notes_idx_liner_id_liner ON liner_notes (liner_id);
222 id INTEGER PRIMARY KEY NOT NULL,
229 -- Table: lyric_versions
231 CREATE TABLE lyric_versions (
232 id INTEGER PRIMARY KEY NOT NULL,
233 lyric_id integer NOT NULL,
234 text varchar(100) NOT NULL
237 CREATE INDEX lyric_versions_idx_lyric_id_ly ON lyric_versions (lyric_id);
242 CREATE TABLE lyrics (
243 lyric_id INTEGER PRIMARY KEY NOT NULL,
244 track_id integer NOT NULL
247 CREATE INDEX lyrics_idx_track_id_lyrics ON lyrics (track_id);
250 -- Table: noprimarykey
252 CREATE TABLE noprimarykey (
253 foo integer NOT NULL,
254 bar integer NOT NULL,
258 CREATE UNIQUE INDEX foo_bar_noprimarykey ON noprimarykey (foo, bar);
263 CREATE TABLE onekey (
264 id INTEGER PRIMARY KEY NOT NULL,
265 artist integer NOT NULL,
273 CREATE TABLE owners (
274 ownerid INTEGER PRIMARY KEY NOT NULL,
275 name varchar(100) NOT NULL
282 CREATE TABLE producer (
283 producerid INTEGER PRIMARY KEY NOT NULL,
284 name varchar(100) NOT NULL
287 CREATE UNIQUE INDEX prod_name_producer ON producer (name);
292 CREATE TABLE self_ref (
293 id INTEGER PRIMARY KEY NOT NULL,
294 name varchar(100) NOT NULL
299 -- Table: self_ref_alias
301 CREATE TABLE self_ref_alias (
302 self_ref integer NOT NULL,
303 alias integer NOT NULL,
304 PRIMARY KEY (self_ref, alias)
307 CREATE INDEX self_ref_alias_idx_alias_self_ ON self_ref_alias (alias);
308 CREATE INDEX self_ref_alias_idx_self_ref_se ON self_ref_alias (self_ref);
311 -- Table: sequence_test
313 CREATE TABLE sequence_test (
314 pkid1 integer NOT NULL,
315 pkid2 integer NOT NULL,
316 nonpkid integer NOT NULL,
318 PRIMARY KEY (pkid1, pkid2)
325 CREATE TABLE serialized (
326 id INTEGER PRIMARY KEY NOT NULL,
327 serialized text NOT NULL
335 tagid INTEGER PRIMARY KEY NOT NULL,
337 tag varchar(100) NOT NULL
340 CREATE INDEX tags_idx_cd_tags ON tags (cd);
346 trackid INTEGER PRIMARY KEY NOT NULL,
348 position integer NOT NULL,
349 title varchar(100) NOT NULL,
350 last_updated_on datetime
353 CREATE INDEX track_idx_cd_track ON track (cd);
354 CREATE UNIQUE INDEX track_cd_position_track ON track (cd, position);
355 CREATE UNIQUE INDEX track_cd_title_track ON track (cd, title);
360 CREATE TABLE treelike (
361 id INTEGER PRIMARY KEY NOT NULL,
363 name varchar(100) NOT NULL
366 CREATE INDEX treelike_idx_parent_treelike ON treelike (parent);
369 -- Table: twokeytreelike
371 CREATE TABLE twokeytreelike (
372 id1 integer NOT NULL,
373 id2 integer NOT NULL,
374 parent1 integer NOT NULL,
375 parent2 integer NOT NULL,
376 name varchar(100) NOT NULL,
377 PRIMARY KEY (id1, id2)
380 CREATE INDEX twokeytreelike_idx_parent1_parent2_twokeytre ON twokeytreelike (parent1, parent2);
381 CREATE UNIQUE INDEX tktlnameunique_twokeytreelike ON twokeytreelike (name);
386 CREATE TABLE twokeys (
387 artist integer NOT NULL,
389 PRIMARY KEY (artist, cd)
392 CREATE INDEX twokeys_idx_artist_twokeys ON twokeys (artist);
395 -- Table: typed_object
397 CREATE TABLE typed_object (
398 objectid INTEGER PRIMARY KEY NOT NULL,
399 type varchar(100) NOT NULL,
400 value varchar(100) NOT NULL