Hi,

I cloned your repo, and used your /accounts app to test. I used DB params for an existing Postgres DB I have. (During installation I noticed that I was getting an error about a too-low version of SQL::Translator (>= v0.11018 required), so I upgraded to v1.60.)

Commenting out the line $connection->deploy(); allowed the app to start and return and render the login page.

I added the line use Data::Dumper; warn Dumper $connection->deployment_statements; and it produced the following output:

$VAR1 = '-- -- Created by SQL::Translator::Producer::PostgreSQL -- Created on Fri Jul 26 08:54:26 2019 -- ';
so I don't believe your Schema class is actually loading a schema from anywhere.

I am not an expert on building DBIx schemas manually and then applying them to storage. I always go the other way. I don't mind using a heavy ORM layer like DBIx, but *I* want to be in control of my DB schema. So I usually write a schema file in SQL, then use it to create a DB, then run dbic_dump to create the DBIX schema file(s) in my app. Perhaps you could try this way around, building your DB and then telling DBIx to go from there.

Hope this helps!


The way forward always starts with a minimal test.

In reply to Re: Database deploy error in Mojolicious app by 1nickt
in thread Database deploy error in Mojolicious app by andreioff

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.