Merge 'DBIx-Class-current' into 'resultset-new-refactor'
[dbsrgits/DBIx-Class.git] / t / lib / sqlite.sql
CommitLineData
0009fa49 1--
2-- Created by SQL::Translator::Producer::SQLite
cb9fdccb 3-- Created on Sat May 20 01:05:10 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--
0a298c73 18-- Table: serialized
19--
20CREATE TABLE serialized (
21 id INTEGER PRIMARY KEY NOT NULL,
22 serialized text NOT NULL
23);
24
25--
38e48163 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--
4e298a80 34-- Table: cd_to_producer
0009fa49 35--
4e298a80 36CREATE TABLE cd_to_producer (
37 cd integer NOT NULL,
38 producer integer NOT NULL,
39 PRIMARY KEY (cd, producer)
0009fa49 40);
41
42--
0009fa49 43-- Table: artist
44--
45CREATE TABLE artist (
46 artistid INTEGER PRIMARY KEY NOT NULL,
80021def 47 name varchar(100)
48);
49
50--
38e48163 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--
0009fa49 63-- Table: self_ref_alias
64--
65CREATE TABLE self_ref_alias (
66 self_ref integer NOT NULL,
887ce227 67 alias integer NOT NULL,
68 PRIMARY KEY (self_ref, alias)
0009fa49 69);
70
71--
0009fa49 72-- Table: cd
73--
74CREATE TABLE cd (
75 cdid INTEGER PRIMARY KEY NOT NULL,
76 artist integer NOT NULL,
8fcf21b3 77 title varchar(100) NOT NULL,
78 year varchar(100) NOT NULL
0009fa49 79);
80
81--
8e6df6ae 82-- Table: bookmark
83--
84CREATE TABLE bookmark (
85 id INTEGER PRIMARY KEY NOT NULL,
86 link integer NOT NULL
87);
88
89--
0009fa49 90-- Table: track
91--
92CREATE TABLE track (
93 trackid INTEGER PRIMARY KEY NOT NULL,
94 cd integer NOT NULL,
95 position integer NOT NULL,
8fcf21b3 96 title varchar(100) NOT NULL
0009fa49 97);
98
99--
0a298c73 100-- Table: self_ref
1c339d71 101--
0a298c73 102CREATE TABLE self_ref (
80021def 103 id INTEGER PRIMARY KEY NOT NULL,
8fcf21b3 104 name varchar(100) NOT NULL
0009fa49 105);
106
107--
0a298c73 108-- Table: treelike
887ce227 109--
0a298c73 110CREATE TABLE treelike (
887ce227 111 id INTEGER PRIMARY KEY NOT NULL,
0a298c73 112 parent integer NOT NULL,
8fcf21b3 113 name varchar(100) NOT NULL
887ce227 114);
115
9fcda149 116--
4e298a80 117-- Table: tags
9fcda149 118--
4e298a80 119CREATE TABLE tags (
120 tagid INTEGER PRIMARY KEY NOT NULL,
80021def 121 cd integer NOT NULL,
4e298a80 122 tag varchar(100) NOT NULL
80021def 123);
124
125--
0a298c73 126-- Table: treelike
887ce227 127--
0a298c73 128CREATE TABLE treelike (
887ce227 129 id INTEGER PRIMARY KEY NOT NULL,
0a298c73 130 parent integer NOT NULL,
8fcf21b3 131 name varchar(100) NOT NULL
887ce227 132);
133
9fcda149 134--
8e6df6ae 135-- Table: link
9fcda149 136--
8e6df6ae 137CREATE TABLE link (
138 id INTEGER PRIMARY KEY NOT NULL,
139 url varchar(100),
140 title varchar(100)
80021def 141);
142
143--
f86fcf0d 144-- Table: event
145--
146CREATE TABLE event (
147 id INTEGER PRIMARY KEY NOT NULL,
148 starts_at datetime NOT NULL
149);
150
151--
4e298a80 152-- Table: twokeys
1e3ff014 153--
4e298a80 154CREATE TABLE twokeys (
155 artist integer NOT NULL,
156 cd integer NOT NULL,
157 PRIMARY KEY (artist, cd)
1e3ff014 158);
159
160--
80021def 161-- Table: fourkeys
162--
163CREATE TABLE fourkeys (
164 foo integer NOT NULL,
165 bar integer NOT NULL,
166 hello integer NOT NULL,
167 goodbye integer NOT NULL,
168 PRIMARY KEY (foo, bar, hello, goodbye)
169);
170
171--
172-- Table: artist_undirected_map
173--
174CREATE TABLE artist_undirected_map (
175 id1 integer NOT NULL,
176 id2 integer NOT NULL,
177 PRIMARY KEY (id1, id2)
178);
179
180--
181-- Table: onekey
182--
183CREATE TABLE onekey (
8fcf21b3 184 id INTEGER PRIMARY KEY NOT NULL,
80021def 185 artist integer NOT NULL,
186 cd integer NOT NULL
187);
188
38e48163 189--
190-- Table: producer
191--
192CREATE TABLE producer (
193 producerid INTEGER PRIMARY KEY NOT NULL,
194 name varchar(100) NOT NULL
195);
196
38e48163 197CREATE UNIQUE INDEX tktlnameunique_twokeytreelike on twokeytreelike (name);
198CREATE UNIQUE INDEX artist_title_cd on cd (artist, title);
0009fa49 199COMMIT;