alexg
alexg

Reputation: 922

Propel: No connection available for myproject database

I'm getting an error while doing

$ ./propel model:build --verbose
Processing: schema.xml
  1 tables processed successfully
1 tables found in 1 schema files.
Generating PHP files...
Datamodel: ./schema.xml
 - Database: myproject
  + Table: resource
        -> (unchanged) /Base/Resource.php
        -> (unchanged) /Map/ResourceTableMap.php
        -> (unchanged) /Base/ResourceQuery.php
        -> (exists) Resource.php
        -> (exists) ResourceQuery.php
                (no change)
Object model generation complete - All files already up to date
$ ./propel sql:build --verbose
Processing: schema.xml
  1 tables processed successfully
1 tables found in 1 schema files.
$ ./propel sql:insert --verbose
No connection available for myproject database
$

The output is:

No connection available for myproject database

Here are my 3 files of interest:

build.properties

runtime-conf.xml

schema.xml

What am I missing?

Thank you.

Upvotes: 0

Views: 205

Answers (1)

Qiniso
Qiniso

Reputation: 2629

You might be missing these in your build.properties:

propel.runtime.conf.file   = runtime-conf.xml
propel.buildtime.conf.file = buildtime-conf.xml

You buildtime-conf.xml is very similar to your runtime-conf.xml, so you can just duplicate, rename and see if it works.

Upvotes: 1

Related Questions