X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Flib%2Fsqlite.sql;h=441c811cfa16107252fe2ee1d79f2003c03a9cc1;hb=1c7ae8d1d2f52bb86704e0caf3128a8097442635;hp=412201509b2995102349eee0dba6bba12191f71e;hpb=d563309646cd5a6d156ffb3d601f9d914926831b;p=dbsrgits%2FDBIx-Class-Historic.git diff --git a/t/lib/sqlite.sql b/t/lib/sqlite.sql index 4122015..441c811 100644 --- a/t/lib/sqlite.sql +++ b/t/lib/sqlite.sql @@ -1,10 +1,11 @@ -- -- Created by SQL::Translator::Producer::SQLite --- Created on Sun Nov 23 13:27:13 2008 +-- Created on Thu May 28 10:10:00 2009 -- -BEGIN TRANSACTION; +BEGIN TRANSACTION; + -- -- Table: artist -- @@ -15,7 +16,6 @@ CREATE TABLE artist ( charfield char(10) ); - -- -- Table: artist_undirected_map -- @@ -26,6 +26,7 @@ CREATE TABLE artist_undirected_map ( ); CREATE INDEX artist_undirected_map_idx_id1_ ON artist_undirected_map (id1); + CREATE INDEX artist_undirected_map_idx_id2_ ON artist_undirected_map (id2); -- @@ -47,9 +48,20 @@ CREATE TABLE artwork_to_artist ( ); CREATE INDEX artwork_to_artist_idx_artist_id_artwork_to_arti ON artwork_to_artist (artist_id); + CREATE INDEX artwork_to_artist_idx_artwork_cd_id_artwork_to_ ON artwork_to_artist (artwork_cd_id); -- +-- Table: bindtype_test +-- +CREATE TABLE bindtype_test ( + id INTEGER PRIMARY KEY NOT NULL, + bytea blob, + blob blob, + clob clob +); + +-- -- Table: bookmark -- CREATE TABLE bookmark ( @@ -70,6 +82,7 @@ CREATE TABLE books ( price integer ); +CREATE INDEX books_idx_owner_books ON books (owner); -- -- Table: cd @@ -84,8 +97,11 @@ CREATE TABLE cd ( ); CREATE INDEX cd_idx_artist_cd ON cd (artist); + CREATE INDEX cd_idx_genreid_cd ON cd (genreid); + CREATE INDEX cd_idx_single_track_cd ON cd (single_track); + CREATE UNIQUE INDEX cd_artist_title_cd ON cd (artist, title); -- @@ -94,10 +110,12 @@ CREATE UNIQUE INDEX cd_artist_title_cd ON cd (artist, title); CREATE TABLE cd_to_producer ( cd integer NOT NULL, producer integer NOT NULL, + attribute integer, PRIMARY KEY (cd, producer) ); CREATE INDEX cd_to_producer_idx_cd_cd_to_pr ON cd_to_producer (cd); + CREATE INDEX cd_to_producer_idx_producer_cd ON cd_to_producer (producer); -- @@ -108,7 +126,6 @@ CREATE TABLE collection ( name varchar(100) NOT NULL ); - -- -- Table: collection_object -- @@ -119,6 +136,7 @@ CREATE TABLE collection_object ( ); CREATE INDEX collection_object_idx_collection_collection_obj ON collection_object (collection); + CREATE INDEX collection_object_idx_object_c ON collection_object (object); -- @@ -129,9 +147,17 @@ CREATE TABLE employee ( position integer NOT NULL, group_id integer, group_id_2 integer, + group_id_3 integer, name varchar(100) ); +-- +-- Table: encoded +-- +CREATE TABLE encoded ( + id INTEGER PRIMARY KEY NOT NULL, + encoded varchar(100) +); -- -- Table: event @@ -145,7 +171,6 @@ CREATE TABLE event ( skip_inflation datetime ); - -- -- Table: file_columns -- @@ -154,7 +179,6 @@ CREATE TABLE file_columns ( file varchar(255) NOT NULL ); - -- -- Table: forceforeign -- @@ -173,11 +197,11 @@ CREATE TABLE fourkeys ( bar integer NOT NULL, hello integer NOT NULL, goodbye integer NOT NULL, - sensors character NOT NULL, + sensors character(10) NOT NULL, + read_count integer, PRIMARY KEY (foo, bar, hello, goodbye) ); - -- -- Table: fourkeys_to_twokeys -- @@ -189,10 +213,12 @@ CREATE TABLE fourkeys_to_twokeys ( t_artist integer NOT NULL, t_cd integer NOT NULL, autopilot character NOT NULL, + pilot_sequence integer, PRIMARY KEY (f_foo, f_bar, f_hello, f_goodbye, t_artist, t_cd) ); CREATE INDEX fourkeys_to_twokeys_idx_f_foo_f_bar_f_hello_f_goodbye_ ON fourkeys_to_twokeys (f_foo, f_bar, f_hello, f_goodbye); + CREATE INDEX fourkeys_to_twokeys_idx_t_artist_t_cd_fourkeys_to ON fourkeys_to_twokeys (t_artist, t_cd); -- @@ -236,7 +262,6 @@ CREATE TABLE link ( title varchar(100) ); - -- -- Table: lyric_versions -- @@ -278,16 +303,14 @@ CREATE TABLE onekey ( cd integer NOT NULL ); - -- -- Table: owners -- CREATE TABLE owners ( - ownerid INTEGER PRIMARY KEY NOT NULL, + id INTEGER PRIMARY KEY NOT NULL, name varchar(100) NOT NULL ); - -- -- Table: producer -- @@ -306,7 +329,6 @@ CREATE TABLE self_ref ( name varchar(100) NOT NULL ); - -- -- Table: self_ref_alias -- @@ -317,6 +339,7 @@ CREATE TABLE self_ref_alias ( ); CREATE INDEX self_ref_alias_idx_alias_self_ ON self_ref_alias (alias); + CREATE INDEX self_ref_alias_idx_self_ref_se ON self_ref_alias (self_ref); -- @@ -330,7 +353,6 @@ CREATE TABLE sequence_test ( PRIMARY KEY (pkid1, pkid2) ); - -- -- Table: serialized -- @@ -339,7 +361,6 @@ CREATE TABLE serialized ( serialized text NOT NULL ); - -- -- Table: tags -- @@ -359,11 +380,14 @@ CREATE TABLE track ( cd integer NOT NULL, position integer NOT NULL, title varchar(100) NOT NULL, - last_updated_on datetime + last_updated_on datetime, + last_updated_at datetime ); CREATE INDEX track_idx_cd_track ON track (cd); + CREATE UNIQUE INDEX track_cd_position_track ON track (cd, position); + CREATE UNIQUE INDEX track_cd_title_track ON track (cd, title); -- @@ -390,6 +414,7 @@ CREATE TABLE twokeytreelike ( ); CREATE INDEX twokeytreelike_idx_parent1_parent2_twokeytre ON twokeytreelike (parent1, parent2); + CREATE UNIQUE INDEX tktlnameunique_twokeytreelike ON twokeytreelike (name); -- @@ -412,5 +437,10 @@ CREATE TABLE typed_object ( value varchar(100) NOT NULL ); +-- +-- View: year2000cds +-- +CREATE VIEW year2000cds AS + SELECT cdid, artist, title FROM cd WHERE year ='2000'; COMMIT;