Tom,
I have tryed to get this working (exporting data using schemas) with no joy.
Here is the extract of biuld.xml defining the ant task
<target name="export-xfrt-data" description="Dumps db structure and data">
<taskdef name="databaseToDdl"
classname="org.apache.ddlutils.task.DatabaseToDdlTask">
<classpath refid="classpath"/>
</taskdef>
<databaseToDdl modelName="fims_testsmall_land" sortforeignkeys="false"
verbosity="DEBUG" schemapattern="xfrt%">
<database url="jdbc:postgresql://my_server/my_db"
driverClassName="org.postgresql.Driver"
username="postgres"
password="XXXX"/>
<writeSchemaToFile outputFile="schema_xfrt.xml" />
<writeDataToFile outputFile="data_xfrt.xml" determineschema="true"/>
</databaseToDdl>
</target>
I get the following messages:
>ant export-xfrt-data
Buildfile: build.xml
export-xfrt-data:
[databaseToDdl] Borrowed connection [EMAIL PROTECTED] from data source
[databaseToDdl] Returning connection [EMAIL PROTECTED] to data source.
[databaseToDdl] Remaining connections: None
BUILD FAILED
C:\apps\Ddlutils-test\build.xml:130: Could not read the schema from the
specified database: There are multiple column wi
th the name role_id in the table app_roles
Total time: 7 seconds
>
I must do something wrong ... but I can not find out what ? ! ?
I have 2 schemas on my database (containing tables with identical names):
xfrt_synch and public !
Cheers,
[EMAIL PROTECTED]
PS: I am following up an old thread !
----- Message d'origine ----
De : Thomas Dudziak <[EMAIL PROTECTED]>
� : [email protected]
Envoy� le : Mardi, 2 Janvier 2007, 4h24mn 00s
Objet : Re: schema mix up !
On 12/26/06, Laurent ROCHE <[EMAIL PROTECTED]> wrote:
> There is a little problem when doing an export of a PostgreSQL database where
> there is
two schema (say public and queries).
>
> The generation of schema.xml is OK.
>
> But when generating data.xml DDL Utils will fail as it will try to read the
> content of
tab1 in QUERIES with the SQL:
> select * from tab1
> instead of
> select * from queries.tab1
Please update DdlUtils and use both the schemapattern parameter
(http://db.apache.org/ddlutils/ant/org.apache.ddlutils.task.DatabaseToDdlTask.html#parameter-schemapattern)
and also set the new determineschema parameter to true
(http://db.apache.org/ddlutils/ant/org.apache.ddlutils.task.WriteDataToFileCommand.html#parameter-determineschema)
Tom
Have fun,
[EMAIL PROTECTED]
The Computing Froggy
______________________________________________________________________________
Stockage illimité de vos mails avec Yahoo! Mail. Changez aujourd'hui de mail !