diff --git a/README.mkdn b/README.mkdn index a23c8d2..9378dda 100644 --- a/README.mkdn +++ b/README.mkdn @@ -612,6 +612,7 @@ missed you. https://github.com/manwar https://github.com/upasana-me https://github.com/rabbiveesh + https://github.com/KES777 # SEE ALSO diff --git a/lib/DBIx/Class/Migration.pm b/lib/DBIx/Class/Migration.pm index 7748453..ccb8c4b 100644 --- a/lib/DBIx/Class/Migration.pm +++ b/lib/DBIx/Class/Migration.pm @@ -71,7 +71,13 @@ has schema => (is=>'lazy', predicate=>'has_schema'); sub _build_schema { my ($self) = @_; - $self->schema_class->connect(@{$self->schema_args}); + my $schema = $self->schema_class->connect(@{$self->schema_args}); + my $storage = $schema->storage; + if( !$storage->sql_maker->quote_char ) { + $storage->sql_maker->quote_char( $storage->sql_quote_char ); + } + + return $schema; } has target_dir_builder_class => ( @@ -426,7 +432,7 @@ sub dump_named_sets { (my $self = shift)->dbic_dh->version_storage_is_installed || print "Target DB is not versioned. Dump may not be reliable.\n"; - my $schema = $self->_schema_from_database; + my $schema = $self->schema->clone; $self->build_dbic_fixtures->dump_config_sets({ schema => $schema, @@ -446,7 +452,7 @@ sub dump_all_sets { (my $self = shift)->dbic_dh->version_storage_is_installed || print "Target DB is not versioned. Dump may not be reliable.\n"; - my $schema = $self->_schema_from_database; + my $schema = $self->schema->clone; $self->build_dbic_fixtures->dump_all_config_sets({ schema => $schema, diff --git a/t/lib/Local/Schema/Result/ArtistCd.pm b/t/lib/Local/Schema/Result/ArtistCd.pm index d36dc36..cff63a8 100644 --- a/t/lib/Local/Schema/Result/ArtistCd.pm +++ b/t/lib/Local/Schema/Result/ArtistCd.pm @@ -1,7 +1,7 @@ package Local::Schema::Result::ArtistCd; use base qw/DBIx::Class::Core/; -__PACKAGE__->table('artist_cd'); +__PACKAGE__->table('artist_cd_not_match'); __PACKAGE__->add_columns( artist_fk => { data_type => 'integer', diff --git a/t/lib/Local/v2/Schema/Result/ArtistCd.pm b/t/lib/Local/v2/Schema/Result/ArtistCd.pm index 26a4b9c..3a60a0d 100644 --- a/t/lib/Local/v2/Schema/Result/ArtistCd.pm +++ b/t/lib/Local/v2/Schema/Result/ArtistCd.pm @@ -1,7 +1,7 @@ package Local::v2::Schema::Result::ArtistCd; use base qw/DBIx::Class::Core/; -__PACKAGE__->table('artist_cd'); +__PACKAGE__->table('artist_cd_not_match'); __PACKAGE__->add_columns( artist_fk => { data_type => 'integer',