in reply to Database deploy error in Mojolicious app
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:
so I don't believe your Schema class is actually loading a schema from anywhere.$VAR1 = '-- -- Created by SQL::Translator::Producer::PostgreSQL -- Created on Fri Jul 26 08:54:26 2019 -- ';
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!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Database deploy error in Mojolicious app
by andreioff (Initiate) on Jul 26, 2019 at 14:16 UTC | |
by Your Mother (Archbishop) on Jul 26, 2019 at 14:26 UTC | |
by 1nickt (Canon) on Jul 26, 2019 at 14:59 UTC | |
by andreioff (Initiate) on Jul 26, 2019 at 20:00 UTC |