- Update mysql driver to handle BIGSERIAL columns
- Update Column.pm, move all mysql and Pg-specific code to DBD driver
callbacks
+ - Update Table.pm, add local_options
0.34 Sun Aug 19 10:08:51 PDT 2007
- More work on update schema from Slaven Rezic <srezic@cpan.org>,
use DBIx::DBSchema::ColGroup::Unique;
use DBIx::DBSchema::ColGroup::Index;
-$VERSION = '0.05';
+$VERSION = '0.06';
$DEBUG = 0;
=head1 NAME
hash reference of named parameters.
{
- name => TABLE_NAME,
- primary_key => PRIMARY_KEY,
- columns => COLUMNS,
- indices => INDICES,
+ name => TABLE_NAME,
+ primary_key => PRIMARY_KEY,
+ columns => COLUMNS,
+ indices => INDICES,
+ local_options => OPTIONS,
#deprecated# unique => UNIQUE,
#deprecated# index => INDEX,
}
(see L<DBIx::DBSchema::Column>). INDICES is a reference to an array of
DBIx::DBSchema::Index objects (see L<DBIx::DBSchema::Index>), or a hash
reference of index names (keys) and DBIx::DBSchema::Index objects (values).
+OPTIONS is a scalar of database-specific table options, such as "WITHOUT OIDS"
+for Pg or "TYPE=InnoDB" for mysql.
Deprecated options:
}
}
+=item local_options [ OPTIONS ]
+
+Returns or sets the database-specific table options string.
+
+=cut
+
+sub local_options {
+ my($self,$value)=@_;
+ if ( defined($value) ) {
+ $self->{local_options} = $value;
+ } else {
+ $self->{local_options};
+ }
+}
+
=item primary_key [ PRIMARY_KEY ]
Returns or sets the primary key.
my $indexnum = 1;
my @r = (
- "CREATE TABLE ". $self->name. " (\n ". join(",\n ", @columns). "\n)\n"
+ "CREATE TABLE ". $self->name. " (\n ". join(",\n ", @columns). "\n)\n".
+ $self->local_options
);
if ( $self->_unique ) {