use strict;
use warnings;
-use base 'DBIx::Class::Schema::Loader::DBI';
+use base qw/
+ DBIx::Class::Schema::Loader::DBI
+ DBIx::Class::Schema::Loader::DBI::Sybase::Common
+/;
use Carp::Clan qw/^DBIx::Class/;
use Class::C3;
-our $VERSION = '0.04999_06';
+our $VERSION = '0.04999_10';
=head1 NAME
my $self = shift;
$self->next::method(@_);
- $self->{db_schema} ||= 'dbo';
+ $self->{db_schema} ||= $self->_build_db_schema;
+ $self->_set_quote_char_and_name_sep;
+}
+
+# remove 'IDENTITY' from column data_type
+sub _columns_info_for {
+ my $self = shift;
+ my $result = $self->next::method(@_);
+
+ for my $col (keys %$result) {
+ $result->{$col}->{data_type} =~ s/\s* identity \s*//ix;
+ }
+
+ return $result;
}
sub _table_pk_info {
my @keydata;
while (my $row = $sth->fetchrow_hashref) {
- push @keydata, lc $row->{COLUMN_NAME};
+ push @keydata, lc $row->{COLUMN_NAME};
}
return \@keydata;
$sth->execute;
while (my $row = $sth->fetchrow_hashref) {
- my $fk = $row->{FK_NAME};
- push @{$local_cols->{$fk}}, lc $row->{FKCOLUMN_NAME};
- push @{$remote_cols->{$fk}}, lc $row->{PKCOLUMN_NAME};
- $remote_table->{$fk} = $row->{PKTABLE_NAME};
+ my $fk = $row->{FK_NAME};
+ push @{$local_cols->{$fk}}, lc $row->{FKCOLUMN_NAME};
+ push @{$remote_cols->{$fk}}, lc $row->{PKCOLUMN_NAME};
+ $remote_table->{$fk} = $row->{PKTABLE_NAME};
}
foreach my $fk (keys %$remote_table) {
- push @rels, {
- local_columns => \@{$local_cols->{$fk}},
- remote_columns => \@{$remote_cols->{$fk}},
- remote_table => $remote_table->{$fk},
- };
+ push @rels, {
+ local_columns => \@{$local_cols->{$fk}},
+ remote_columns => \@{$remote_cols->{$fk}},
+ remote_table => $remote_table->{$fk},
+ };
}
return \@rels;
Justin Hunter C<justin.d.hunter@gmail.com>
+=head1 CONTRIBUTORS
+
+Rafael Kitover <rkitover@cpan.org>
+
=cut
1;