Commit | Line | Data |
0009fa49 |
1 | -- |
2 | -- Created by SQL::Translator::Producer::SQLite |
365d06b7 |
3 | -- Created on Thu Jun 6 23:36:19 2006 |
0009fa49 |
4 | -- |
5 | BEGIN TRANSACTION; |
6 | |
7 | -- |
38e48163 |
8 | -- Table: employee |
4e298a80 |
9 | -- |
38e48163 |
10 | CREATE 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 | -- |
0a298c73 |
18 | -- Table: serialized |
19 | -- |
20 | CREATE TABLE serialized ( |
21 | id INTEGER PRIMARY KEY NOT NULL, |
22 | serialized text NOT NULL |
23 | ); |
24 | |
25 | -- |
4e298a80 |
26 | -- Table: cd_to_producer |
0009fa49 |
27 | -- |
4e298a80 |
28 | CREATE TABLE cd_to_producer ( |
29 | cd integer NOT NULL, |
30 | producer integer NOT NULL, |
31 | PRIMARY KEY (cd, producer) |
0009fa49 |
32 | ); |
33 | |
34 | -- |
3bd6e3e0 |
35 | -- Table: liner_notes |
36 | -- |
37 | CREATE TABLE liner_notes ( |
38 | liner_id INTEGER PRIMARY KEY NOT NULL, |
39 | notes varchar(100) NOT NULL |
40 | ); |
41 | |
42 | -- |
0009fa49 |
43 | -- Table: artist |
44 | -- |
45 | CREATE TABLE artist ( |
46 | artistid INTEGER PRIMARY KEY NOT NULL, |
80021def |
47 | name varchar(100) |
48 | ); |
49 | |
50 | -- |
3bd6e3e0 |
51 | -- Table: fourkeys_to_twokeys |
52 | -- |
53 | CREATE TABLE fourkeys_to_twokeys ( |
54 | f_foo integer NOT NULL, |
55 | f_bar integer NOT NULL, |
56 | f_hello integer NOT NULL, |
57 | f_goodbye integer NOT NULL, |
58 | t_artist integer NOT NULL, |
59 | t_cd integer NOT NULL, |
60 | autopilot character NOT NULL, |
61 | PRIMARY KEY (f_foo, f_bar, f_hello, f_goodbye, t_artist, t_cd) |
62 | ); |
63 | |
64 | -- |
38e48163 |
65 | -- Table: twokeytreelike |
66 | -- |
67 | CREATE TABLE twokeytreelike ( |
68 | id1 integer NOT NULL, |
69 | id2 integer NOT NULL, |
70 | parent1 integer NOT NULL, |
71 | parent2 integer NOT NULL, |
72 | name varchar(100) NOT NULL, |
73 | PRIMARY KEY (id1, id2) |
74 | ); |
75 | |
76 | -- |
0009fa49 |
77 | -- Table: self_ref_alias |
78 | -- |
79 | CREATE 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 | -- |
88 | CREATE 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 | -- |
8e6df6ae |
96 | -- Table: bookmark |
97 | -- |
98 | CREATE TABLE bookmark ( |
99 | id INTEGER PRIMARY KEY NOT NULL, |
100 | link integer NOT NULL |
101 | ); |
102 | |
103 | -- |
0009fa49 |
104 | -- Table: track |
105 | -- |
106 | CREATE 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: treelike |
1c339d71 |
115 | -- |
3bd6e3e0 |
116 | CREATE TABLE treelike ( |
80021def |
117 | id INTEGER PRIMARY KEY NOT NULL, |
3bd6e3e0 |
118 | parent integer NOT NULL, |
8fcf21b3 |
119 | name varchar(100) NOT NULL |
0009fa49 |
120 | ); |
121 | |
122 | -- |
3bd6e3e0 |
123 | -- Table: self_ref |
887ce227 |
124 | -- |
3bd6e3e0 |
125 | CREATE TABLE self_ref ( |
887ce227 |
126 | id INTEGER PRIMARY KEY NOT NULL, |
8fcf21b3 |
127 | name varchar(100) NOT NULL |
887ce227 |
128 | ); |
129 | |
9fcda149 |
130 | -- |
8e6df6ae |
131 | -- Table: link |
9fcda149 |
132 | -- |
8e6df6ae |
133 | CREATE TABLE link ( |
134 | id INTEGER PRIMARY KEY NOT NULL, |
135 | url varchar(100), |
136 | title varchar(100) |
80021def |
137 | ); |
138 | |
139 | -- |
3bd6e3e0 |
140 | -- Table: tags |
141 | -- |
142 | CREATE TABLE tags ( |
143 | tagid INTEGER PRIMARY KEY NOT NULL, |
144 | cd integer NOT NULL, |
145 | tag varchar(100) NOT NULL |
146 | ); |
147 | |
148 | -- |
f86fcf0d |
149 | -- Table: event |
150 | -- |
151 | CREATE TABLE event ( |
152 | id INTEGER PRIMARY KEY NOT NULL, |
c03ccdbc |
153 | starts_at datetime NOT NULL, |
154 | created_on timestamp NOT NULL |
f86fcf0d |
155 | ); |
156 | |
157 | -- |
4e298a80 |
158 | -- Table: twokeys |
1e3ff014 |
159 | -- |
4e298a80 |
160 | CREATE TABLE twokeys ( |
161 | artist integer NOT NULL, |
162 | cd integer NOT NULL, |
163 | PRIMARY KEY (artist, cd) |
1e3ff014 |
164 | ); |
165 | |
166 | -- |
80021def |
167 | -- Table: fourkeys |
168 | -- |
169 | CREATE 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, |
80021def |
175 | PRIMARY KEY (foo, bar, hello, goodbye) |
176 | ); |
177 | |
178 | -- |
179 | -- Table: artist_undirected_map |
180 | -- |
181 | CREATE TABLE artist_undirected_map ( |
182 | id1 integer NOT NULL, |
183 | id2 integer NOT NULL, |
184 | PRIMARY KEY (id1, id2) |
185 | ); |
186 | |
187 | -- |
3bd6e3e0 |
188 | -- Table: producer |
189 | -- |
190 | CREATE TABLE producer ( |
191 | producerid INTEGER PRIMARY KEY NOT NULL, |
192 | name varchar(100) NOT NULL |
193 | ); |
194 | |
195 | -- |
80021def |
196 | -- Table: onekey |
197 | -- |
198 | CREATE TABLE onekey ( |
8fcf21b3 |
199 | id INTEGER PRIMARY KEY NOT NULL, |
80021def |
200 | artist integer NOT NULL, |
201 | cd integer NOT NULL |
202 | ); |
203 | |
38e48163 |
204 | CREATE UNIQUE INDEX tktlnameunique_twokeytreelike on twokeytreelike (name); |
368a5228 |
205 | CREATE UNIQUE INDEX cd_artist_title_cd on cd (artist, title); |
365d06b7 |
206 | CREATE UNIQUE INDEX track_cd_position_track on track (cd, position); |
207 | CREATE UNIQUE INDEX track_cd_title_track on track (cd, title); |
368a5228 |
208 | CREATE UNIQUE INDEX prod_name_producer on producer (name); |
0009fa49 |
209 | COMMIT; |