f5f147576335d403fd7eaa4395dfbfff698e68e0
[dbsrgits/DBIx-Class-Schema-Loader.git] / t / 13db2_common.t
1 use strict;
2 use lib qw(t/lib);
3 use dbixcsl_common_tests;
4
5 my $dsn      = $ENV{DBICTEST_DB2_DSN} || '';
6 my $user     = $ENV{DBICTEST_DB2_USER} || '';
7 my $password = $ENV{DBICTEST_DB2_PASS} || '';
8
9 my $tester = dbixcsl_common_tests->new(
10     vendor         => 'DB2',
11     auto_inc_pk    => 'INTEGER GENERATED BY DEFAULT AS IDENTITY NOT NULL PRIMARY KEY',
12     dsn            => $dsn,
13     user           => $user,
14     password       => $password,
15     null           => '',
16     preserve_case_mode_is_exclusive => 1,
17     quote_char                      => '"',
18     data_types => {
19         'timestamp DEFAULT CURRENT TIMESTAMP' => { data_type => 'timestamp', default_value => \'current_timestamp',
20                                                    original => { default_value => \'current timestamp' } },
21     },
22 );
23
24 if( !$dsn || !$user ) {
25     $tester->skip_tests('You need to set the DBICTEST_DB2_DSN, _USER, and _PASS environment variables');
26 }
27 else {
28     $tester->run_tests();
29 }
30 # vim:et sts=4 sw=4 tw=0: