X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Flib%2Fsqlite.sql;h=9e8aaa6e9226736e396264758bd981603228c57d;hb=41916570b3a93b05746e23b73c9a9b5005bc0d2e;hp=fcdae19f900416d35507a9f78c5910436fe48f8d;hpb=4f6386b03a5e179c64240c8ab7b3bbec8a2004e1;p=dbsrgits%2FDBIx-Class.git diff --git a/t/lib/sqlite.sql b/t/lib/sqlite.sql index fcdae19..9e8aaa6 100644 --- a/t/lib/sqlite.sql +++ b/t/lib/sqlite.sql @@ -1,10 +1,11 @@ -- -- Created by SQL::Translator::Producer::SQLite --- Created on Mon Nov 17 02:53:11 2008 +-- Created on Thu Apr 30 10:04:57 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); -- @@ -38,6 +39,29 @@ CREATE TABLE cd_artwork ( CREATE INDEX cd_artwork_idx_cd_id_cd_artwor ON cd_artwork (cd_id); -- +-- Table: artwork_to_artist +-- +CREATE TABLE artwork_to_artist ( + artwork_cd_id integer NOT NULL, + artist_id integer NOT NULL, + PRIMARY KEY (artwork_cd_id, artist_id) +); + +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 ( @@ -58,7 +82,6 @@ CREATE TABLE books ( price integer ); - -- -- Table: cd -- @@ -72,8 +95,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); -- @@ -86,6 +112,7 @@ CREATE TABLE cd_to_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); -- @@ -96,7 +123,6 @@ CREATE TABLE collection ( name varchar(100) NOT NULL ); - -- -- Table: collection_object -- @@ -107,6 +133,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); -- @@ -117,9 +144,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 @@ -133,7 +168,6 @@ CREATE TABLE event ( skip_inflation datetime ); - -- -- Table: file_columns -- @@ -142,7 +176,6 @@ CREATE TABLE file_columns ( file varchar(255) NOT NULL ); - -- -- Table: forceforeign -- @@ -165,7 +198,6 @@ CREATE TABLE fourkeys ( PRIMARY KEY (foo, bar, hello, goodbye) ); - -- -- Table: fourkeys_to_twokeys -- @@ -181,6 +213,7 @@ CREATE TABLE fourkeys_to_twokeys ( ); 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); -- @@ -224,7 +257,6 @@ CREATE TABLE link ( title varchar(100) ); - -- -- Table: lyric_versions -- @@ -266,7 +298,6 @@ CREATE TABLE onekey ( cd integer NOT NULL ); - -- -- Table: owners -- @@ -275,7 +306,6 @@ CREATE TABLE owners ( name varchar(100) NOT NULL ); - -- -- Table: producer -- @@ -294,7 +324,6 @@ CREATE TABLE self_ref ( name varchar(100) NOT NULL ); - -- -- Table: self_ref_alias -- @@ -305,6 +334,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); -- @@ -318,7 +348,6 @@ CREATE TABLE sequence_test ( PRIMARY KEY (pkid1, pkid2) ); - -- -- Table: serialized -- @@ -327,7 +356,6 @@ CREATE TABLE serialized ( serialized text NOT NULL ); - -- -- Table: tags -- @@ -351,7 +379,9 @@ CREATE TABLE track ( ); 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); -- @@ -378,6 +408,7 @@ CREATE TABLE twokeytreelike ( ); CREATE INDEX twokeytreelike_idx_parent1_parent2_twokeytre ON twokeytreelike (parent1, parent2); + CREATE UNIQUE INDEX tktlnameunique_twokeytreelike ON twokeytreelike (name); -- @@ -400,5 +431,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;