[Dbix-class] create_ddl_dir with MySQL / InnoDB
Juan Camacho
jc5826 at gmail.com
Fri Jun 6 18:41:39 BST 2008
On Fri, Jun 6, 2008 at 11:20 AM, Ash Berlin <ash_cpan at firemirror.com> wrote:
>
> What error is it giving? What version of MySQL (server) are you using?
>
I was originally getting this error:
ERROR 1005 (HY000): Can't create table './test/attendee.frm' (errno: 150)
I believe it's because the reference tables do not exist yet. The
tables are created in alpha order in the SQL file.
> That isn't where mysql_table_type goes - you want something like this in
> your Schema.pm file (assuming you got the extra key right - i didn't check)
>
> sub sqlt_deploy_hook {
> my ($self, $sqlt_schema) = @_;
>
> for my $table ($sqlt_schema->get_tables) {
> $table->extra(
> mysql_table_type => 'MyISAM',
> );
> }
> }
>
Yes, this does the trick. Thank you very much.
On a somewhat separate issue, do you know how I could get the
auto_increment added for the primary key in the SQL file? I just
noticed it wasn't there.
Thanks again.
More information about the DBIx-Class
mailing list