X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F98savepoints.t;h=45fe577f187d240e49321316ddbc586b9c4f9f89;hb=68de943862f06cabd397d2e74d12cd9cdc999779;hp=28b00cf31f9373bffcc56681d85ad3797d55b801;hpb=bb4526151477c9afe0678b15423b3bb329a476be;p=dbsrgits%2FDBIx-Class.git diff --git a/t/98savepoints.t b/t/98savepoints.t index 28b00cf..45fe577 100644 --- a/t/98savepoints.t +++ b/t/98savepoints.t @@ -2,24 +2,25 @@ use strict; use warnings; use Test::More; -use lib qw(t/lib); -use DBICTest; -use DBICTest::Stats; my ($create_sql, $dsn, $user, $pass); -if (exists $ENV{DBICTEST_PG_DSN}) { +if ($ENV{DBICTEST_PG_DSN}) { ($dsn, $user, $pass) = @ENV{map { "DBICTEST_PG_${_}" } qw/DSN USER PASS/}; - $create_sql = "CREATE TABLE artist (artistid serial PRIMARY KEY, name VARCHAR(100), charfield CHAR(10))"; -} elsif (exists $ENV{DBICTEST_MYSQL_DSN}) { + $create_sql = "CREATE TABLE artist (artistid serial PRIMARY KEY, name VARCHAR(100), rank INTEGER NOT NULL DEFAULT '13', charfield CHAR(10))"; +} elsif ($ENV{DBICTEST_MYSQL_DSN}) { ($dsn, $user, $pass) = @ENV{map { "DBICTEST_MYSQL_${_}" } qw/DSN USER PASS/}; - $create_sql = "CREATE TABLE artist (artistid INTEGER NOT NULL AUTO_INCREMENT PRIMARY KEY, name VARCHAR(255), charfield CHAR(10)) ENGINE=InnoDB"; + $create_sql = "CREATE TABLE artist (artistid INTEGER NOT NULL AUTO_INCREMENT PRIMARY KEY, name VARCHAR(100), rank INTEGER NOT NULL DEFAULT '13', charfield CHAR(10)) ENGINE=InnoDB"; } else { plan skip_all => 'Set DBICTEST_(PG|MYSQL)_DSN _USER and _PASS if you want to run savepoint tests'; } +use lib qw(t/lib); +use DBICTest; +use DBICTest::Stats; + plan tests => 16; my $schema = DBICTest::Schema->connect ($dsn,$user,$pass,{ auto_savepoint => 1 });