From: Peter Rabbitson Date: Tue, 9 Sep 2008 22:56:22 +0000 (+0000) Subject: Align self-deploying tests with the CD schema changes introduced by r4773 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=b10cb676b8a6d5d6b1ced0fbc6b68ab789db0bfe;p=dbsrgits%2FDBIx-Class-Historic.git Align self-deploying tests with the CD schema changes introduced by r4773 --- diff --git a/t/50fork.t b/t/50fork.t index 8379547..381872d 100644 --- a/t/50fork.t +++ b/t/50fork.t @@ -34,7 +34,7 @@ eval { { local $SIG{__WARN__} = sub {}; eval { $dbh->do("DROP TABLE cd") }; - $dbh->do("CREATE TABLE cd (cdid serial PRIMARY KEY, artist INTEGER NOT NULL UNIQUE, title VARCHAR(255) NOT NULL UNIQUE, year VARCHAR(255));"); + $dbh->do("CREATE TABLE cd (cdid serial PRIMARY KEY, artist INTEGER NOT NULL UNIQUE, title VARCHAR(100) NOT NULL UNIQUE, year VARCHAR(100) NOT NULL, genreid INTEGER);"); } $schema->resultset('CD')->create({ title => 'vacation in antarctica', artist => 123, year => 1901 }); diff --git a/t/51threads.t b/t/51threads.t index 36ea86f..45e6247 100644 --- a/t/51threads.t +++ b/t/51threads.t @@ -44,7 +44,7 @@ eval { { local $SIG{__WARN__} = sub {}; eval { $dbh->do("DROP TABLE cd") }; - $dbh->do("CREATE TABLE cd (cdid serial PRIMARY KEY, artist INTEGER NOT NULL UNIQUE, title VARCHAR(255) NOT NULL UNIQUE, year VARCHAR(255));"); + $dbh->do("CREATE TABLE cd (cdid serial PRIMARY KEY, artist INTEGER NOT NULL UNIQUE, title VARCHAR(100) NOT NULL UNIQUE, year VARCHAR(100) NOT NULL, genreid INTEGER);"); } $schema->resultset('CD')->create({ title => 'vacation in antarctica', artist => 123, year => 1901 }); diff --git a/t/51threadtxn.t b/t/51threadtxn.t index 9908b8c..7af0ff8 100644 --- a/t/51threadtxn.t +++ b/t/51threadtxn.t @@ -44,7 +44,7 @@ eval { { local $SIG{__WARN__} = sub {}; eval { $dbh->do("DROP TABLE cd") }; - $dbh->do("CREATE TABLE cd (cdid serial PRIMARY KEY, artist INTEGER NOT NULL UNIQUE, title VARCHAR(255) NOT NULL UNIQUE, year VARCHAR(255));"); + $dbh->do("CREATE TABLE cd (cdid serial PRIMARY KEY, artist INTEGER NOT NULL UNIQUE, title VARCHAR(100) NOT NULL UNIQUE, year VARCHAR(100) NOT NULL, genreid INTEGER);"); } $schema->resultset('CD')->create({ title => 'vacation in antarctica', artist => 123, year => 1901 }); diff --git a/t/74mssql.t b/t/74mssql.t index 26fffcf..6ad30d6 100644 --- a/t/74mssql.t +++ b/t/74mssql.t @@ -26,10 +26,11 @@ my $dbh = $schema->storage->dbh; $dbh->do("IF OBJECT_ID('artist', 'U') IS NOT NULL DROP TABLE artist"); +$dbh->do("IF OBJECT_ID('cd', 'U') IS NOT NULL + DROP TABLE cd"); $dbh->do("CREATE TABLE artist (artistid INT IDENTITY PRIMARY KEY, name VARCHAR(255));"); -$dbh->do("CREATE TABLE cd (cdid INT IDENTITY PRIMARY KEY, artist INT, title VARCHAR(100), year VARCHAR(100));"); - +$dbh->do("CREATE TABLE cd (cdid INT IDENTITY PRIMARY KEY, artist INT, title VARCHAR(100), year VARCHAR(100), genreid INT NULL);"); # Just to test compat shim, Auto is in Core $schema->class('Artist')->load_components('PK::Auto::MSSQL');