X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Flib%2Fsqlite.sql;h=91782638003979b3ce588ef6b1482693474c3377;hb=e66002835945589b7174d524ba5add64e714abd2;hp=7478cb7c2bbdc94e5c28762fa507177d46a3dc4f;hpb=68888c09820ea25810c03cdc7748ee374a7772b2;p=dbsrgits%2FDBIx-Class-Historic.git diff --git a/t/lib/sqlite.sql b/t/lib/sqlite.sql index 7478cb7..9178263 100644 --- a/t/lib/sqlite.sql +++ b/t/lib/sqlite.sql @@ -1,8 +1,7 @@ -- -- Created by SQL::Translator::Producer::SQLite --- Created on Sun Mar 7 11:14:14 2010 +-- Created on Sun Oct 17 01:51:06 2010 -- -; -- -- Table: artist @@ -10,12 +9,16 @@ CREATE TABLE artist ( artistid INTEGER PRIMARY KEY NOT NULL, name varchar(100), - rank integer NOT NULL DEFAULT '13', + rank integer NOT NULL DEFAULT 13, charfield char(10) ); CREATE INDEX artist_name_hookidx ON artist (name); +CREATE UNIQUE INDEX artist_name ON artist (name); + +CREATE UNIQUE INDEX u_nullable ON artist (charfield, rank); + -- -- Table: bindtype_test -- @@ -47,7 +50,7 @@ CREATE TABLE encoded ( -- CREATE TABLE event ( id INTEGER PRIMARY KEY NOT NULL, - starts_at datetime NOT NULL, + starts_at date NOT NULL, created_on timestamp NOT NULL, varchar_date varchar(20), varchar_datetime varchar(20), @@ -169,6 +172,14 @@ CREATE TABLE serialized ( ); -- +-- Table: timestamp_primary_key_test +-- +CREATE TABLE timestamp_primary_key_test ( + id timestamp NOT NULL DEFAULT current_timestamp, + PRIMARY KEY (id) +); + +-- -- Table: treelike -- CREATE TABLE treelike ( @@ -240,6 +251,8 @@ CREATE TABLE books ( CREATE INDEX books_idx_owner ON books (owner); +CREATE UNIQUE INDEX books_title ON books (title); + -- -- Table: employee -- @@ -375,6 +388,14 @@ CREATE TABLE tags ( CREATE INDEX tags_idx_cd ON tags (cd); +CREATE UNIQUE INDEX tagid_cd ON tags (tagid, cd); + +CREATE UNIQUE INDEX tagid_cd_tag ON tags (tagid, cd, tag); + +CREATE UNIQUE INDEX tags_tagid_tag ON tags (tagid, tag); + +CREATE UNIQUE INDEX tags_tagid_tag_cd ON tags (tagid, tag, cd); + -- -- Table: cd_to_producer -- @@ -448,4 +469,4 @@ CREATE INDEX fourkeys_to_twokeys_idx_t_artist_t_cd ON fourkeys_to_twokeys (t_art -- View: year2000cds -- CREATE VIEW year2000cds AS - SELECT cdid, artist, title, year, genreid, single_track FROM cd WHERE year = "2000" \ No newline at end of file + SELECT cdid, artist, title, year, genreid, single_track FROM cd WHERE year = "2000";