Add extra warning guard and object creation tests to 20invocations.t
[dbsrgits/DBIx-Class-Schema-Loader.git] / t / backcompat / 0.04006 / lib / make_dbictest_db.pm
CommitLineData
9a95164d 1package make_dbictest_db;
2
3use strict;
4use warnings;
5use DBI;
6
7eval { require DBD::SQLite };
8my $class = $@ ? 'SQLite2' : 'SQLite';
9
10my $fn = './t/dbictest.db';
11
12unlink($fn);
13our $dsn = "dbi:$class:dbname=$fn";
14my $dbh = DBI->connect($dsn);
15
16$dbh->do($_) for (
17 q|CREATE TABLE foo (
18 fooid INTEGER PRIMARY KEY,
19 footext TEXT
20 )|,
21 q|CREATE TABLE bar (
22 barid INTEGER PRIMARY KEY,
23 fooref INTEGER REFERENCES foo(fooid)
24 )|,
25 q|INSERT INTO foo VALUES (1,'Foo text for number 1')|,
26 q|INSERT INTO foo VALUES (2,'Foo record associated with the Bar with barid 3')|,
27 q|INSERT INTO foo VALUES (3,'Foo text for number 3')|,
28 q|INSERT INTO foo VALUES (4,'Foo text for number 4')|,
29 q|INSERT INTO bar VALUES (1,4)|,
30 q|INSERT INTO bar VALUES (2,3)|,
31 q|INSERT INTO bar VALUES (3,2)|,
32 q|INSERT INTO bar VALUES (4,1)|,
33);
34
35END { unlink($fn); }
36
371;