X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Flib%2Fsqlite.sql;h=ea5891b47dc9ce1418bfcc210e095d1990bcf949;hb=abf8d91e24dae052a0af4b65ffee4e72044d54bb;hp=26c06f4ccf3bd12ee4414edf39df8057a6fa7f69;hpb=d41a29a006864aeb97540570bb58073f2b7943ef;p=dbsrgits%2FDBIx-Class.git diff --git a/t/lib/sqlite.sql b/t/lib/sqlite.sql index 26c06f4..ea5891b 100644 --- a/t/lib/sqlite.sql +++ b/t/lib/sqlite.sql @@ -1,8 +1,7 @@ -- -- Created by SQL::Translator::Producer::SQLite --- Created on Sat Mar 6 18:04:27 2010 +-- Created on Thu Nov 18 08:18:15 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 -- @@ -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 -- @@ -285,8 +298,7 @@ CREATE TABLE track ( position int NOT NULL, title varchar(100) NOT NULL, last_updated_on datetime, - last_updated_at datetime, - small_dt smalldatetime + last_updated_at datetime ); CREATE INDEX track_idx_cd ON track (cd); @@ -375,6 +387,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 +468,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" + SELECT cdid, artist, title, year, genreid, single_track FROM cd WHERE year = "2000";