Revision history for Perl extension DBIx::Class::Schema::Loader
+0.03005 Wed Jul 19 15:09:30 UTC 2006
+ [ Pretty much everything in this release originates from nilsonsfj patches ]
+ - bugfix: mysql unique constraint code had an
+ obvious but longstanding error
+ - bugfix: columns were being specified out-of-order,
+ bug was introduced in the 0.03004 column metadata
+ dumping feature
- dump code now skips+warns instead of dies when
- dump_overwrite not set [from nilsonsfj]
+ dump_overwrite not set
0.03004 Tue Jul 11 04:38:09 UTC 2006
- make_schema_at efficiency improvements
$self->_dbic_stmt($table_class,'add_columns',@$cols);
}
else {
- my %cols_hash;
- foreach my $col (@$cols) {
- $cols_hash{$col} = \%{($col_info->{$col})};
- }
- $self->_dbic_stmt($table_class,'add_columns',%cols_hash);
+ $self->_dbic_stmt(
+ $table_class,
+ 'add_columns',
+ map { $_, $col_info->{$_} } @$cols
+ );
}
my $pks = $self->_table_pk_info($table) || [];
my @uniqs;
my $keydata = $self->_mysql_table_get_keys($table);
- foreach my $keyname (%$keydata) {
+ foreach my $keyname (keys %$keydata) {
next if $keyname eq 'PRIMARY';
push(@uniqs, [ $keyname => $keydata->{$keyname} ]);
}
sub run_tests {
my $self = shift;
- plan tests => 73;
+ plan tests => 76;
$self->create();
isa_ok( $rsobj23, "DBIx::Class::ResultSet" );
isa_ok( $rsobj24, "DBIx::Class::ResultSet" );
+ my @columns_lt2 = $class2->columns;
+ is($columns_lt2[0], 'id', "Column Ordering 0");
+ is($columns_lt2[1], 'dat', "Column Ordering 1");
+ is($columns_lt2[2], 'dat2', "Column Ordering 2");
+
my %uniq1 = $class1->unique_constraints;
my $uniq1_test = 0;
foreach my $ucname (keys %uniq1) {