From: Rafael Kitover Date: Sun, 23 Jan 2011 12:03:13 +0000 (-0500) Subject: Add extra test blob type X-Git-Tag: v0.08191~90 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=f3a9ea3d41f4d32346bc5ea7ce83a7dcfe45b118;p=dbsrgits%2FDBIx-Class.git Add extra test blob type --- diff --git a/t/73oracle.t b/t/73oracle.t index b372adb..45f6152 100644 --- a/t/73oracle.t +++ b/t/73oracle.t @@ -531,7 +531,7 @@ sub do_creates { $dbh->do("CREATE TABLE ${q}track${q} (${q}trackid${q} NUMBER(12), ${q}cd${q} NUMBER(12) REFERENCES CD(${q}cdid${q}) DEFERRABLE, ${q}position${q} NUMBER(12), ${q}title${q} VARCHAR(255), ${q}last_updated_on${q} DATE, ${q}last_updated_at${q} DATE)"); $dbh->do("ALTER TABLE ${q}track${q} ADD (CONSTRAINT ${q}track_pk${q} PRIMARY KEY (${q}trackid${q}))"); - $dbh->do("CREATE TABLE ${q}bindtype_test${q} (${q}id${q} integer NOT NULL PRIMARY KEY, ${q}bytea${q} integer NULL, ${q}blob${q} blob NULL, ${q}clob${q} clob NULL)"); + $dbh->do("CREATE TABLE ${q}bindtype_test${q} (${q}id${q} integer NOT NULL PRIMARY KEY, ${q}bytea${q} integer NULL, ${q}blob${q} blob NULL, ${q}clob${q} clob NULL, ${q}a_memo${q} integer NULL)"); $dbh->do(qq{ CREATE OR REPLACE TRIGGER ${q}artist_insert_trg_auto${q} diff --git a/t/746sybase.t b/t/746sybase.t index 6b54699..4bcc6dd 100644 --- a/t/746sybase.t +++ b/t/746sybase.t @@ -346,10 +346,11 @@ SQL $dbh->do(qq[ CREATE TABLE bindtype_test ( - id INT IDENTITY PRIMARY KEY, - bytea IMAGE NULL, - blob IMAGE NULL, - clob TEXT NULL + id INT IDENTITY PRIMARY KEY, + bytea IMAGE NULL, + blob IMAGE NULL, + clob TEXT NULL, + a_memo IMAGE NULL ) ],{ RaiseError => 1, PrintError => 0 }); } @@ -441,11 +442,13 @@ SQL bytea => 1, blob => $binstr{large}, clob => $new_str, + a_memo => 2, }, { bytea => 1, blob => $binstr{large}, clob => $new_str, + a_memo => 2, }, ]); } 'insert_bulk with blobs does not die'; @@ -471,12 +474,14 @@ SQL bytea => 1, blob => $binstr{large}, clob => $new_str, + a_memo => 2, }, { id => 2, bytea => 1, blob => $binstr{large}, clob => $new_str, + a_memo => 2, }, ]); } 'insert_bulk with blobs and explicit identity does NOT die'; diff --git a/t/749sqlanywhere.t b/t/749sqlanywhere.t index d8a33a3..e086065 100644 --- a/t/749sqlanywhere.t +++ b/t/749sqlanywhere.t @@ -134,10 +134,11 @@ EOF $dbh->do(qq[ CREATE TABLE bindtype_test ( - id INT NOT NULL PRIMARY KEY, - bytea INT NULL, - blob LONG BINARY NULL, - clob LONG VARCHAR NULL + id INT NOT NULL PRIMARY KEY, + bytea INT NULL, + blob LONG BINARY NULL, + clob LONG VARCHAR NULL, + a_memo INT NULL ) ],{ RaiseError => 1, PrintError => 1 }); diff --git a/t/750firebird.t b/t/750firebird.t index 3618edf..733f390 100644 --- a/t/750firebird.t +++ b/t/750firebird.t @@ -218,7 +218,8 @@ EOF "id" INT PRIMARY KEY, "bytea" INT, "blob" BLOB, - "clob" BLOB SUB_TYPE TEXT + "clob" BLOB SUB_TYPE TEXT, + "a_memo" INT ) ]); diff --git a/t/bind/bindtype_columns.t b/t/bind/bindtype_columns.t index a6be997..940ce92 100644 --- a/t/bind/bindtype_columns.t +++ b/t/bind/bindtype_columns.t @@ -20,12 +20,13 @@ my $dbh = $schema->storage->dbh; # the blob/clob are for reference only, will be useful when we switch to SQLT and can test Oracle along the way $dbh->do(qq[ - CREATE TABLE bindtype_test + CREATE TABLE bindtype_test ( id serial NOT NULL PRIMARY KEY, bytea bytea NULL, blob bytea NULL, - clob text NULL + clob text NULL, + a_memo text NULL ); ],{ RaiseError => 1, PrintError => 1 }); } diff --git a/t/lib/DBICTest/Schema/BindType.pm b/t/lib/DBICTest/Schema/BindType.pm index 5670f2f..459aef7 100644 --- a/t/lib/DBICTest/Schema/BindType.pm +++ b/t/lib/DBICTest/Schema/BindType.pm @@ -22,6 +22,10 @@ __PACKAGE__->add_columns( data_type => 'clob', is_nullable => 1, }, + 'a_memo' => { + data_type => 'memo', + is_nullable => 1, + }, ); __PACKAGE__->set_primary_key('id'); diff --git a/t/lib/sqlite.sql b/t/lib/sqlite.sql index ea5891b..b14bd5e 100644 --- a/t/lib/sqlite.sql +++ b/t/lib/sqlite.sql @@ -1,6 +1,6 @@ -- -- Created by SQL::Translator::Producer::SQLite --- Created on Thu Nov 18 08:18:15 2010 +-- Created on Mon Feb 21 12:10:04 2011 -- -- @@ -26,7 +26,8 @@ CREATE TABLE bindtype_test ( id INTEGER PRIMARY KEY NOT NULL, bytea blob, blob blob, - clob clob + clob clob, + a_memo memo ); --