Sets the locale attribute for L<DBIx::Class::InflateColumn::DateTime> for all
columns with the DATE/DATETIME/TIMESTAMP data_types.
-=head1 config_file
+=head2 config_file
File in Perl format, which should return a HASH reference, from which to read
loader options.
-=head1 preserve_case
+=head2 preserve_case
Usually column names are lowercased, to make them easier to work with in
L<DBIx::Class>. This option lets you turn this behavior off, if the driver
Currently the drivers for SQLite, mysql, MSSQL and Firebird/InterBase support
setting this option.
-=head1 qualify_objects
+=head2 qualify_objects
Set to true to prepend the L</db_schema> to table names for C<<
__PACKAGE__->table >> calls, and to some other things like Oracle sequences.
my $fks = $self->_table_fk_info($table);
- for my $fkdef (@$fks) {
+ foreach my $fkdef (@$fks) {
for my $col (@{ $fkdef->{local_columns} }) {
$col_info->{$col}{is_foreign_key} = 1;
}
}
+
+ my $pks = $self->_table_pk_info($table) || [];
+
+ foreach my $pkcol (@$pks) {
+ $col_info->{$pkcol}{is_nullable} = 0;
+ }
+
$self->_dbic_stmt(
$table_class,
'add_columns',
my %uniq_tag; # used to eliminate duplicate uniqs
- my $pks = $self->_table_pk_info($table) || [];
@$pks ? $self->_dbic_stmt($table_class,'set_primary_key',@$pks)
: carp("$table has no primary key");
$uniq_tag{ join("\0", @$pks) }++ if @$pks; # pk is a uniq