8 use DBIx::Class::DeploymentHandler;
9 use aliased 'DBIx::Class::DeploymentHandler', 'DH';
11 use File::Path qw(remove_tree mkpath);
17 my $db = 'dbi:SQLite:db.db';
18 my @connection = ($db, '', '', { ignore_version => 1, }, { on_connect_do => sub { die }});
19 my $sql_dir = 't/sql';
22 use_ok 'DBICVersion_v1';
23 my $s = DBICVersion::Schema->connect(@connection);
24 $DBICVersion::Schema::VERSION = 1;
25 ok($s, 'DBICVersion::Schema 1 instantiates correctly');
26 ok !$s->storage->connected, 'creating schema did not connect';
27 my $handler = DH->new({
28 script_directory => $sql_dir,
30 databases => 'SQLite',
31 sql_translator_args => { add_drop_table => 0 },
33 ok !$s->storage->connected, 'creating handler did not connect';
34 ok($handler, 'DBIx::Class::DeploymentHandler w/1 instantiates correctly');
36 mkpath('t/sql/SQLite/preinstall/1');
37 $handler->preinstall({ version => 1, storage_type => 'SQLite' });
38 ok !$s->storage->connected, 'creating schema did not connect';