You are viewing a plain text version of this content. The canonical link for it is here.
Posted to torque-dev@db.apache.org by Martin Nattrodt <ma...@x-root.de> on 2003/03/04 17:51:51 UTC
AW: Configuration for different databases
Hello,
I want just describe what I am doing:
We want to prepare different Database for our software. So we need some SQL
Statements for different databases.
First we extract the schema from the database (ant -f build-torque.xml
jdbc).
Then I want to create statements for different databases.
Today I started to extract data and create SQL statements for the data.
There are two problems:
The one I described already (different databases needs different
properties).
The other is, that the source and target names are not always the same in
build-torque.xml.
I did the following sequence:
ant -f build-torque.xml jdbc
# Then you have to rename schema.xml to YOURSCHEMA-schema.xml
ant -f build-torque.xml datadump
# Copy the data xml file from src/ to schema/ and rename it
# Change the build.properties for your target database.
# If necessary edit sqldb.map
ant -f build-torque.xml sql
ant -f build-torque.xml insert-sql
At first time it was a little bit hard to get around with torque. At the
moment I use some scripts to do the work around. But I am looking for a easy
way.
I think the best way is to modify the build-torque.xml file that all
databases get there own target dir.
Something like:
mysql
+- src
+- schema
+- ..
db2
+- src
+- schema
+- ..
Martin
> -----Ursprüngliche Nachricht-----
> Von: Eric Emminger [mailto:eric@ericemminger.com]
> Gesendet: Dienstag, 4. März 2003 16:06
> An: Turbine Torque Users List
> Betreff: Re: Configuration for different databases
>
>
> Thank you, Howard, for informing me! :)
>
> You could request this as a new feature if you want.
>
> Thanks again.
>
> Eric
>
> Howard Lin wrote:
> > Torque run time supports multiple database configuration
> but not at "generation" time. Here is the quote from that tutorial:
> > "It is worth re-iterating that these run-time properties
> are not used by Torque when generating your object model and
> creating your database. They are used only by the application
> utilizing the Torque-generated object model classes at run-time."
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
> For additional commands, e-mail: torque-user-help@db.apache.org
>