I was looking at Torque as a tool that could copy a DataBase schema between two different databases. I was hoping that I could produce a schema from an Oracle database using the jdbc task using one build.properties file, then after replacing the file for using with MySQL I was hoping that I could populate an empty database with the same schema.
The jdbc task produces what looks like a valid xml representation of the DB in question, but the create-db task produces an error because the sql it creates is as follows: File: /src.sql/create-db.sql: drop database if exists default; create database default; For some reason you can not run this code with the name of "default", it would work for another database name, and my first question is how can I define the database name during the jdbc or create-db process? Apart from that error, I was hoping that the sql produced would set up all the tables, can Torque actually produce the sql that creates the tables themselves, or have I got the wrong impression of what Torque can actually do? >From the sql above (the only sql in the file) I would have expected several "create table" statements, or this done in a later section of the create-db ant task. So my second question is, am I labouring under the false pretence that Torque can actually create tables, or otherwise what am I doing wrong? I am using ant 1.5, Torque RC1 and the command lines of: Ant -f build.torque.xml jdbc (to extract from an Oracle DB) Change the properties file to a new file that has the parameters of the MySql database then run: Ant -f build.torque.xml create-db (To hopefully populate the database) Thanks in advance. -Mike
