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!

In reply to Re^2: Basic question on "Catalyst in 5 minutes" by panchoh
in thread Basic question on "Catalyst in 5 minutes" by andreas1234567

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.