in reply to Re: Basic question on "Catalyst in 5 minutes"
in thread Basic question on "Catalyst in 5 minutes"

Hi!

I think I have found a bug in DBIx::Class::Schema::Loader, which relates to this copy&paste problem here.

It seems that DBIx::Class::Schema::Loader does not like SQL constructs like this:

CREATE TABLE foo
(id INTEGER);
but is happy with constructs like this:
CREATE TABLE foo(
id INTEGER);
The problem seems to be where the opening parentheses lies.

N.B. that SQLite is happy with either one.

For what I can see from the Catalyst in 5 minutes presentation, the opening parentheses there is in a new line, and hence running

$ script/blog_create model Blog DBIC::Schema Blog create=static dbi:SQLite:database.db
is doomed to fail.

Please, confirm that you can reproduce the situation. I intend to fill a bug report against DBIx::Class::Schema::Loader.

Hope that it helps, fellow mongers.

Update: The bug belonged in DBD-SQLite: bug #34408, and there is already a patch which solves the issue. Thanks, ilmari!
  • Comment on Re^2: Basic question on "Catalyst in 5 minutes"