fixed phing targets for db migrations

pull/1/head
ppaulis 2016-11-02 10:09:27 +01:00
parent 00b4e9af91
commit f7604dfd9c
3 changed files with 7 additions and 6 deletions

View File

@ -3,9 +3,10 @@ author.name=Pascal Paulis
author.email=pascal.paulis@continuousphp.com author.email=pascal.paulis@continuousphp.com
db.host=localhost db.host=localhost
db.name=monarc
db.username=dbuser db.username=dbuser
db.password=123 db.password=123
db.name.core=monarc_core
db.name.backoffice=monarc_backoffice
dir.bin=./bin dir.bin=./bin

View File

@ -38,7 +38,7 @@
<token key="db.host" value="${db.host}"/> <token key="db.host" value="${db.host}"/>
<token key="db.username" value="${db.username}"/> <token key="db.username" value="${db.username}"/>
<token key="db.password" value="${db.password}"/> <token key="db.password" value="${db.password}"/>
<token key="db.name" value="${db.name}"/> <token key="db.name.backoffice" value="${db.name.backoffice}"/>
</replacetokens> </replacetokens>
</filterchain> </filterchain>
</loadfile> </loadfile>
@ -97,8 +97,8 @@
</target> </target>
<target name="db-migration" description="Update the database version"> <target name="db-migration" description="Update the database version">
<exec command="${project.basedir}/scripts/client-upgrade-db.sh backoffice ${db.host} ${db.username} ${db.password} ${db.name}" passthru="true"/> <exec command="${project.basedir}/scripts/client-upgrade-db.sh backoffice ${db.host} ${db.username} ${db.password} ${db.name.backoffice}" passthru="true"/>
<exec command="${project.basedir}/scripts/client-upgrade-db.sh core ${db.host} ${db.username} ${db.password} ${db.name}" passthru="true"/> <exec command="${project.basedir}/scripts/client-upgrade-db.sh core ${db.host} ${db.username} ${db.password} ${db.name.core}" passthru="true"/>
</target> </target>
<target name="reset-db" <target name="reset-db"

View File

@ -8,7 +8,7 @@ return array(
'host' => '@db.host@', 'host' => '@db.host@',
'user' => '@db.username@', 'user' => '@db.username@',
'password' => '@db.password@', 'password' => '@db.password@',
'dbname' => '@db.name@', 'dbname' => '@db.name.backoffice@',
) )
), ),
'orm_cli' => array( 'orm_cli' => array(
@ -16,7 +16,7 @@ return array(
'host' => '@db.host@', 'host' => '@db.host@',
'user' => '@db.username@', 'user' => '@db.username@',
'password' => '@db.password@', 'password' => '@db.password@',
'dbname' => '@db.name@', 'dbname' => '@db.name.backoffice@',
) )
) )
) )