Anego
view release on metacpan or search on metacpan
use DBIx::Schema::DSL;
database 'SQLite';
create_table user => columns {
integer 'id' => not_null, unsigned, primary_key;
varchar 'name' => not_null;
datetime 'created_at' => not_null;
datetime 'updated_at' => not_null;
};
1;
__SCHEMA__
spew($schema_file, $schema2);
$repo->run('add', $schema_file);
$repo->run('commit', '-m', 'second commit');
my $config = <<__CONFIG__;
};
is $stdout, <<__DDL__;
BEGIN;
CREATE TABLE user (
id INTEGER PRIMARY KEY NOT NULL,
name VARCHAR(255) NOT NULL,
created_at DATETIME NOT NULL,
updated_at DATETIME NOT NULL
);
COMMIT;
__DDL__
is $stderr, '';
};
subtest 'migrate (1)' => sub {
( run in 0.358 second using v1.01-cache-2.11-cpan-05444aca049 )