2 -- Created by SQL::Translator::Producer::SQLite
3 -- Created on Mon Nov 10 23:52:55 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 bookmark (
35 id INTEGER PRIMARY KEY NOT NULL,
39 CREATE INDEX bookmark_idx_link_bookmark ON bookmark (link);
45 id INTEGER PRIMARY KEY NOT NULL,
46 source varchar(100) NOT NULL,
47 owner integer NOT NULL,
48 title varchar(100) NOT NULL,
57 cdid INTEGER PRIMARY KEY NOT NULL,
58 artist integer NOT NULL,
59 title varchar(100) NOT NULL,
60 year varchar(100) NOT NULL,
64 CREATE INDEX cd_idx_artist_cd ON cd (artist);
65 CREATE INDEX cd_idx_genreid_cd ON cd (genreid);
66 CREATE UNIQUE INDEX cd_artist_title_cd ON cd (artist, title);
69 -- Table: cd_to_producer
71 CREATE TABLE cd_to_producer (
73 producer integer NOT NULL,
74 PRIMARY KEY (cd, producer)
77 CREATE INDEX cd_to_producer_idx_cd_cd_to_pr ON cd_to_producer (cd);
78 CREATE INDEX cd_to_producer_idx_producer_cd ON cd_to_producer (producer);
83 CREATE TABLE collection (
84 collectionid INTEGER PRIMARY KEY NOT NULL,
85 name varchar(100) NOT NULL
90 -- Table: collection_object
92 CREATE TABLE collection_object (
93 collection integer NOT NULL,
94 object integer NOT NULL,
95 PRIMARY KEY (collection, object)
98 CREATE INDEX collection_object_idx_collection_collection_obj ON collection_object (collection);
99 CREATE INDEX collection_object_idx_object_c ON collection_object (object);
104 CREATE TABLE employee (
105 employee_id INTEGER PRIMARY KEY NOT NULL,
106 position integer NOT NULL,
117 id INTEGER PRIMARY KEY NOT NULL,
118 starts_at datetime NOT NULL,
119 created_on timestamp NOT NULL,
120 varchar_date varchar(20),
121 varchar_datetime varchar(20),
122 skip_inflation datetime
127 -- Table: file_columns
129 CREATE TABLE file_columns (
130 id INTEGER PRIMARY KEY NOT NULL,
131 file varchar(255) NOT NULL
136 -- Table: forceforeign
138 CREATE TABLE forceforeign (
139 artist INTEGER PRIMARY KEY NOT NULL,
143 CREATE INDEX forceforeign_idx_artist_forcef ON forceforeign (artist);
148 CREATE TABLE fourkeys (
149 foo integer NOT NULL,
150 bar integer NOT NULL,
151 hello integer NOT NULL,
152 goodbye integer NOT NULL,
153 sensors character NOT NULL,
154 PRIMARY KEY (foo, bar, hello, goodbye)
159 -- Table: fourkeys_to_twokeys
161 CREATE TABLE fourkeys_to_twokeys (
162 f_foo integer NOT NULL,
163 f_bar integer NOT NULL,
164 f_hello integer NOT NULL,
165 f_goodbye integer NOT NULL,
166 t_artist integer NOT NULL,
167 t_cd integer NOT NULL,
168 autopilot character NOT NULL,
169 PRIMARY KEY (f_foo, f_bar, f_hello, f_goodbye, t_artist, t_cd)
172 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);
173 CREATE INDEX fourkeys_to_twokeys_idx_t_artist_t_cd_fourkeys_to ON fourkeys_to_twokeys (t_artist, t_cd);
179 genreid INTEGER PRIMARY KEY NOT NULL,
180 name varchar(100) NOT NULL
183 CREATE UNIQUE INDEX genre_name_genre ON genre (name);
186 -- Table: liner_notes
188 CREATE TABLE liner_notes (
189 liner_id INTEGER PRIMARY KEY NOT NULL,
190 notes varchar(100) NOT NULL
193 CREATE INDEX liner_notes_idx_liner_id_liner ON liner_notes (liner_id);
199 id INTEGER PRIMARY KEY NOT NULL,
206 -- Table: noprimarykey
208 CREATE TABLE noprimarykey (
209 foo integer NOT NULL,
210 bar integer NOT NULL,
214 CREATE UNIQUE INDEX foo_bar_noprimarykey ON noprimarykey (foo, bar);
219 CREATE TABLE onekey (
220 id INTEGER PRIMARY KEY NOT NULL,
221 artist integer NOT NULL,
229 CREATE TABLE owners (
230 ownerid INTEGER PRIMARY KEY NOT NULL,
231 name varchar(100) NOT NULL
238 CREATE TABLE producer (
239 producerid INTEGER PRIMARY KEY NOT NULL,
240 name varchar(100) NOT NULL
243 CREATE UNIQUE INDEX prod_name_producer ON producer (name);
248 CREATE TABLE self_ref (
249 id INTEGER PRIMARY KEY NOT NULL,
250 name varchar(100) NOT NULL
255 -- Table: self_ref_alias
257 CREATE TABLE self_ref_alias (
258 self_ref integer NOT NULL,
259 alias integer NOT NULL,
260 PRIMARY KEY (self_ref, alias)
263 CREATE INDEX self_ref_alias_idx_alias_self_ ON self_ref_alias (alias);
264 CREATE INDEX self_ref_alias_idx_self_ref_se ON self_ref_alias (self_ref);
267 -- Table: sequence_test
269 CREATE TABLE sequence_test (
270 pkid1 integer NOT NULL,
271 pkid2 integer NOT NULL,
272 nonpkid integer NOT NULL,
274 PRIMARY KEY (pkid1, pkid2)
281 CREATE TABLE serialized (
282 id INTEGER PRIMARY KEY NOT NULL,
283 serialized text NOT NULL
291 tagid INTEGER PRIMARY KEY NOT NULL,
293 tag varchar(100) NOT NULL
296 CREATE INDEX tags_idx_cd_tags ON tags (cd);
302 trackid INTEGER PRIMARY KEY NOT NULL,
304 position integer NOT NULL,
305 title varchar(100) NOT NULL,
306 last_updated_on datetime
309 CREATE INDEX track_idx_cd_track ON track (cd);
310 CREATE UNIQUE INDEX track_cd_position_track ON track (cd, position);
311 CREATE UNIQUE INDEX track_cd_title_track ON track (cd, title);
316 CREATE TABLE treelike (
317 id INTEGER PRIMARY KEY NOT NULL,
319 name varchar(100) NOT NULL
322 CREATE INDEX treelike_idx_parent_treelike ON treelike (parent);
325 -- Table: twokeytreelike
327 CREATE TABLE twokeytreelike (
328 id1 integer NOT NULL,
329 id2 integer NOT NULL,
330 parent1 integer NOT NULL,
331 parent2 integer NOT NULL,
332 name varchar(100) NOT NULL,
333 PRIMARY KEY (id1, id2)
336 CREATE INDEX twokeytreelike_idx_parent1_parent2_twokeytre ON twokeytreelike (parent1, parent2);
337 CREATE UNIQUE INDEX tktlnameunique_twokeytreelike ON twokeytreelike (name);
342 CREATE TABLE twokeys (
343 artist integer NOT NULL,
345 PRIMARY KEY (artist, cd)
348 CREATE INDEX twokeys_idx_artist_twokeys ON twokeys (artist);
351 -- Table: typed_object
353 CREATE TABLE typed_object (
354 objectid INTEGER PRIMARY KEY NOT NULL,
355 type varchar(100) NOT NULL,
356 value varchar(100) NOT NULL