role SQL::Translator::Parser::DDL::PostgreSQL {
use MooseX::Types::Moose qw(Str);
use MooseX::MultiMethods;
+ use Moose::Autobox;
use SQL::Translator::Constants qw(:sqlt_types :sqlt_constants);
use SQL::Translator::Types qw(Schema);
use aliased 'SQL::Translator::Object::Column';
$schema->add_table($table);
$table->extra({ temporary => 1 }) if $tdata->{'temporary'};
- $table->comments( $tdata->{'comments'} );
+ $table->comments( $tdata->{'comments'}->flatten ) if $tdata->{comments};
my @fields = sort { $tdata->{'fields'}{ $a }{'order'} <=> $tdata->{'fields'}{ $b }{'order'} } keys %{ $tdata->{'fields'} };
role SQL::Translator::Parser::DDL::SQLite {
use MooseX::Types::Moose qw(Str);
use MooseX::MultiMethods;
+ use Moose::Autobox;
use SQL::Translator::Constants qw(:sqlt_types :sqlt_constants);
use SQL::Translator::Types qw(Schema);
use aliased 'SQL::Translator::Object::Column';
for my $table_name ( @tables ) {
my $tdata = $result->{'tables'}{ $table_name };
my $table = Table->new({ name => $tdata->{'name'}, schema => $schema });
- $table->comments( $tdata->{'comments'} );
+ $table->comments( $tdata->{'comments'}->flatten ) if $tdata->{comments};
$schema->add_table($table);
for my $fdata ( @{ $tdata->{'fields'} } ) {
default_value => $fdata->{'default'},
is_auto_increment => $fdata->{'is_auto_inc'},
is_nullable => $fdata->{'is_nullable'},
- comments => $fdata->{'comments'},
table => $table,
});
$table->add_column($field);