Agavi database overrides for Propel + MySQL (other databases)

Once you generated your myproject-conf.php and myproject-classmap.php, you'll notice and copy and paste them into your app/config-folder you'll maybe want to set user and password for a specific AgaviPropelDatabase.

<?xml version="1.0" encoding="UTF-8"?>
    &lt;configurations xmlns="http://agavi.org/agavi/1.0/config">
    &lt;configuration environment="development">
        &lt;databases default="[strong]mydb[/strong]">
        &lt;database name="[strong]mydb[/strong]" class="AgaviPropelDatabase">
        &lt;parameter name="config">
        &lt;parameter name="overrides">
        &lt;parameter name="connection">
        &lt;parameter name="user">root&lt;/parameter>
        &lt;parameter name="password">&lt;/parameter>

Here you also can change the dns-entry to match different sql servers!

Your runtime-conf.xml for propel looks like that:

<?xml version="1.0" encoding="UTF-8"?>
        &lt;datasources default="[strong]mydb[/strong]">
            &lt;datasource id="[strong]mydb[/strong]">

                    this ID must match <database name="">
                    in schema.xml

                        sqlite, mysql, myssql, oracle, or pgsql

In agavi, open source, php, propel by
@ 09 Oct 2008, Comments at Reddit & Hackernews

Give something back

Were my blog posts useful to you? If you want to give back, support one of these charities, too!

Report hate in social media Campact e.V. With our technology and your help, we protect the oceans from plastic waste. Gesellschaft fur Freiheitsrechte e. V. The civil eye in the mediterranean

Recent Dev-Articles

Read recently

Recent Files