create-db just create database, no tables. To create tables, use sql task, which 
generates a sql script to drop/create tables. 

jdbc task generates an xml schema file but you need to edit it by hand to add name 
attribute. So when create-db will not use 'default' as database name.

Howard Lin

> -----Original Message-----
> From: Michael Mills [mailto:michael.mills@;sssltd.co.uk]
> Sent: Wednesday, October 30, 2002 6:27 AM
> To: Turbine Torque Users List
> Subject: Create-db query
> 
> 
> 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
> 
> 
-------------------------------------------------------------------------------------------------
The information transmitted is intended only for the person or entity to
which it is addressed and may contain confidential and/or privileged
material.  Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by persons or
entities other than the intended recipient is prohibited.   If you received
this in error, please contact the sender and delete the material from any
computer.
-------------------------------------------------------------------------------------------------

--
To unsubscribe, e-mail:   <mailto:turbine-torque-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:turbine-torque-user-help@;jakarta.apache.org>

Reply via email to