From: Rafael Kitover Date: Tue, 4 Jan 2011 12:06:53 +0000 (-0500) Subject: Move mssql/sybase guid tests to their own table (do not reuse artist) X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=b1bdb76d043ec2057ffa8dcf00f5fade9f98a1fa;p=dbsrgits%2FDBIx-Class-Historic.git Move mssql/sybase guid tests to their own table (do not reuse artist) --- diff --git a/t/746mssql.t b/t/746mssql.t index 6584050..ba8d1b8 100644 --- a/t/746mssql.t +++ b/t/746mssql.t @@ -407,9 +407,9 @@ for my $dialect ( { $schema->storage->dbh_do (sub { my ($storage, $dbh) = @_; - eval { $dbh->do("DROP TABLE artist") }; + eval { $dbh->do("DROP TABLE artist_guid") }; $dbh->do(<<'SQL'); -CREATE TABLE artist ( +CREATE TABLE artist_guid ( artistid UNIQUEIDENTIFIER NOT NULL, name VARCHAR(100), rank INT NOT NULL DEFAULT '13', @@ -486,14 +486,13 @@ SQL is $rs->find($row->id)->amount, undef,'updated money value to NULL round-trip'; } - done_testing; # clean up our mess END { if (my $dbh = eval { $schema->storage->_dbh }) { eval { $dbh->do("DROP TABLE $_") } - for qw/artist money_test books owners/; + for qw/artist artist_guid money_test books owners/; } } # vim:sw=2 sts=2 diff --git a/t/749sqlanywhere.t b/t/749sqlanywhere.t index 9091c2d..d8a33a3 100644 --- a/t/749sqlanywhere.t +++ b/t/749sqlanywhere.t @@ -176,9 +176,9 @@ EOF $schema->storage->dbh_do (sub { my ($storage, $dbh) = @_; - eval { $dbh->do("DROP TABLE artist") }; + eval { $dbh->do("DROP TABLE artist_guid") }; $dbh->do(<<"SQL"); -CREATE TABLE artist ( +CREATE TABLE artist_guid ( artistid $uuid_type NOT NULL, name VARCHAR(100), rank INT NOT NULL DEFAULT '13', @@ -220,5 +220,6 @@ SQL done_testing; sub cleanup { - eval { $schema->storage->dbh->do("DROP TABLE $_") } for qw/artist bindtype_test/; + eval { $schema->storage->dbh->do("DROP TABLE $_") } + for qw/artist artist_guid bindtype_test/; } diff --git a/t/lib/DBICTest/Schema/ArtistGUID.pm b/t/lib/DBICTest/Schema/ArtistGUID.pm index cad8965..ce619b9 100644 --- a/t/lib/DBICTest/Schema/ArtistGUID.pm +++ b/t/lib/DBICTest/Schema/ArtistGUID.pm @@ -5,7 +5,7 @@ use base qw/DBICTest::BaseResult/; # test MSSQL uniqueidentifier type -__PACKAGE__->table('artist'); +__PACKAGE__->table('artist_guid'); __PACKAGE__->add_columns( 'artistid' => { data_type => 'uniqueidentifier' # auto_nextval not necessary for PK