Commit | Line | Data |
0009fa49 |
1 | -- |
2 | -- Created by SQL::Translator::Producer::SQLite |
d56d8619 |
3 | -- Created on Sun Jul 23 00:23:30 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 | -- |
8fcf21b3 |
18 | -- Table: serialized |
19 | -- |
20 | CREATE TABLE serialized ( |
21 | id INTEGER PRIMARY KEY NOT NULL, |
22 | serialized text NOT NULL |
23 | ); |
24 | |
25 | -- |
8fcf21b3 |
26 | -- Table: liner_notes |
27 | -- |
28 | CREATE 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 | -- |
36 | CREATE 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 | -- |
45 | CREATE TABLE artist ( |
46 | artistid INTEGER PRIMARY KEY NOT NULL, |
8fcf21b3 |
47 | name varchar(100) |
0009fa49 |
48 | ); |
49 | |
50 | -- |
9c2c91ea |
51 | -- Table: twokeytreelike |
52 | -- |
53 | CREATE 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 | -- |
65 | CREATE 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 | -- |
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 | -- |
9c2c91ea |
96 | -- Table: bookmark |
0009fa49 |
97 | -- |
9c2c91ea |
98 | CREATE TABLE bookmark ( |
0009fa49 |
99 | id INTEGER PRIMARY KEY NOT NULL, |
9c2c91ea |
100 | link integer NOT NULL |
0009fa49 |
101 | ); |
102 | |
103 | -- |
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: self_ref |
887ce227 |
115 | -- |
3bd6e3e0 |
116 | CREATE 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 |
124 | CREATE 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 |
133 | CREATE 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 | -- |
142 | CREATE 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 |
151 | CREATE 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 |
160 | CREATE TABLE twokeys ( |
161 | artist integer NOT NULL, |
162 | cd integer NOT NULL, |
163 | PRIMARY KEY (artist, cd) |
164 | ); |
165 | |
166 | -- |
89034887 |
167 | -- Table: noprimarykey |
168 | -- |
169 | CREATE TABLE noprimarykey ( |
170 | foo integer NOT NULL, |
171 | bar integer NOT NULL, |
172 | baz integer NOT NULL |
173 | ); |
174 | |
175 | -- |
9c2c91ea |
176 | -- Table: fourkeys |
177 | -- |
178 | CREATE TABLE fourkeys ( |
179 | foo integer NOT NULL, |
180 | bar integer NOT NULL, |
181 | hello integer NOT NULL, |
182 | goodbye integer NOT NULL, |
3bd6e3e0 |
183 | sensors character NOT NULL, |
9c2c91ea |
184 | PRIMARY KEY (foo, bar, hello, goodbye) |
185 | ); |
186 | |
187 | -- |
188 | -- Table: artist_undirected_map |
189 | -- |
190 | CREATE TABLE artist_undirected_map ( |
191 | id1 integer NOT NULL, |
192 | id2 integer NOT NULL, |
193 | PRIMARY KEY (id1, id2) |
194 | ); |
195 | |
196 | -- |
197 | -- Table: producer |
198 | -- |
199 | CREATE TABLE producer ( |
200 | producerid INTEGER PRIMARY KEY NOT NULL, |
8fcf21b3 |
201 | name varchar(100) NOT NULL |
887ce227 |
202 | ); |
203 | |
9fcda149 |
204 | -- |
9c2c91ea |
205 | -- Table: onekey |
9fcda149 |
206 | -- |
9c2c91ea |
207 | CREATE TABLE onekey ( |
8fcf21b3 |
208 | id INTEGER PRIMARY KEY NOT NULL, |
9c2c91ea |
209 | artist integer NOT NULL, |
210 | cd integer NOT NULL |
9fcda149 |
211 | ); |
212 | |
38e48163 |
213 | CREATE UNIQUE INDEX tktlnameunique_twokeytreelike on twokeytreelike (name); |
368a5228 |
214 | CREATE UNIQUE INDEX cd_artist_title_cd on cd (artist, title); |
365d06b7 |
215 | CREATE UNIQUE INDEX track_cd_position_track on track (cd, position); |
216 | CREATE UNIQUE INDEX track_cd_title_track on track (cd, title); |
89034887 |
217 | CREATE UNIQUE INDEX foo_bar_noprimarykey on noprimarykey (foo, bar); |
368a5228 |
218 | CREATE UNIQUE INDEX prod_name_producer on producer (name); |
0009fa49 |
219 | COMMIT; |