Added InflateColumn::DateTime component
[dbsrgits/DBIx-Class-Historic.git] / t / lib / sqlite.sql
CommitLineData
0009fa49 1--
2-- Created by SQL::Translator::Producer::SQLite
f86fcf0d 3-- Created on Wed Apr 26 03:18:22 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--
0009fa49 82-- Table: track
83--
84CREATE TABLE track (
85 trackid INTEGER PRIMARY KEY NOT NULL,
86 cd integer NOT NULL,
87 position integer NOT NULL,
8fcf21b3 88 title varchar(100) NOT NULL
0009fa49 89);
90
91--
0a298c73 92-- Table: self_ref
1c339d71 93--
0a298c73 94CREATE TABLE self_ref (
80021def 95 id INTEGER PRIMARY KEY NOT NULL,
8fcf21b3 96 name varchar(100) NOT NULL
0009fa49 97);
98
99--
0a298c73 100-- Table: treelike
887ce227 101--
0a298c73 102CREATE TABLE treelike (
887ce227 103 id INTEGER PRIMARY KEY NOT NULL,
0a298c73 104 parent integer NOT NULL,
8fcf21b3 105 name varchar(100) NOT NULL
887ce227 106);
107
9fcda149 108--
4e298a80 109-- Table: tags
9fcda149 110--
4e298a80 111CREATE TABLE tags (
112 tagid INTEGER PRIMARY KEY NOT NULL,
80021def 113 cd integer NOT NULL,
4e298a80 114 tag varchar(100) NOT NULL
80021def 115);
116
117--
f86fcf0d 118-- Table: event
119--
120CREATE TABLE event (
121 id INTEGER PRIMARY KEY NOT NULL,
122 starts_at datetime NOT NULL
123);
124
125--
4e298a80 126-- Table: twokeys
1e3ff014 127--
4e298a80 128CREATE TABLE twokeys (
129 artist integer NOT NULL,
130 cd integer NOT NULL,
131 PRIMARY KEY (artist, cd)
1e3ff014 132);
133
134--
80021def 135-- Table: fourkeys
136--
137CREATE TABLE fourkeys (
138 foo integer NOT NULL,
139 bar integer NOT NULL,
140 hello integer NOT NULL,
141 goodbye integer NOT NULL,
142 PRIMARY KEY (foo, bar, hello, goodbye)
143);
144
145--
146-- Table: artist_undirected_map
147--
148CREATE TABLE artist_undirected_map (
149 id1 integer NOT NULL,
150 id2 integer NOT NULL,
151 PRIMARY KEY (id1, id2)
152);
153
154--
155-- Table: onekey
156--
157CREATE TABLE onekey (
8fcf21b3 158 id INTEGER PRIMARY KEY NOT NULL,
80021def 159 artist integer NOT NULL,
160 cd integer NOT NULL
161);
162
38e48163 163--
164-- Table: producer
165--
166CREATE TABLE producer (
167 producerid INTEGER PRIMARY KEY NOT NULL,
168 name varchar(100) NOT NULL
169);
170
171CREATE UNIQUE INDEX position_group_employee on employee (position, group_id);
172CREATE UNIQUE INDEX tktlnameunique_twokeytreelike on twokeytreelike (name);
173CREATE UNIQUE INDEX artist_title_cd on cd (artist, title);
0009fa49 174COMMIT;