parser (Anders Nor Berle)
- Refactored DBIx::Class::Schema::Versioned
- Syntax errors from resultset components are now reported correctly
+ - sqltargs respected correctly in deploy et al.
0.08010 2008-03-01 10:30
- Fix t/94versioning.t so it passes with latest SQL::Translator
. $self->_check_sqlt_message . q{'})
if !$self->_check_sqlt_version;
- my $sqlt = SQL::Translator->new({
- add_drop_table => 1,
- });
+ my $sqlt = SQL::Translator->new( $sqltargs );
$sqlt->parser('SQL::Translator::Parser::DBIx::Class');
my $sqlt_schema = $sqlt->translate({ data => $schema }) or die $sqlt->error;
my $source_schema;
{
- my $t = SQL::Translator->new;
+ my $t = SQL::Translator->new($sqltargs);
$t->debug( 0 );
$t->trace( 0 );
$t->parser( $db ) or die $t->error;
+ $t = $self->configure_sqlt($t, $db);
my $out = $t->translate( $prefilename ) or die $t->error;
$source_schema = $t->schema;
unless ( $source_schema->name ) {
my $dest_schema = $sqlt_schema;
unless ( "SQL::Translator::Producer::$db"->can('preprocess_schema') ) {
- my $t = SQL::Translator->new;
+ my $t = SQL::Translator->new($sqltargs);
$t->debug( 0 );
$t->trace( 0 );
$t->parser( $db ) or die $t->error;
+ $t = $self->configure_sqlt($t, $db);
my $out = $t->translate( $filename ) or die $t->error;
$dest_schema = $t->schema;
$dest_schema->name( $filename )
my $diff = SQL::Translator::Diff::schema_diff($source_schema, $db,
$dest_schema, $db,
- {}
+ $sqltargs
);
if(!open $file, ">$difffile")
{
$on_update = $otherrelationship->{'attrs'}->{cascade_copy} ? 'CASCADE' : '';
}
- my $is_deferrable = $rel_info->{attrs}{is_deferrable} || 0;
+ my $is_deferrable = $rel_info->{attrs}{is_deferrable};
# Make sure we dont create the same foreign key constraint twice
my $key_test = join("\x00", @keys);
reference_table => $rel_table,
on_delete => $on_delete,
on_update => $on_update,
- deferrable => $is_deferrable,
+ defined $is_deferrable ? ( deferrable => $is_deferrable ) : (),
);
my $index = $table->add_index(