db-ddlutils-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Einsle (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DDLUTILS-39) Creating Foreign Keys before creating the matching Tables
Date Fri, 28 Oct 2005 12:50:56 GMT
    [ http://issues.apache.org/jira/browse/DDLUTILS-39?page=comments#action_12356202 ] 

Robert Einsle commented on DDLUTILS-39:

Matching Code-Sniplets:

BAse functionality:

--- cut ---
Connection db = DriverManager.getConnection("jdbc:postgresql://datenbank/lakon20051021", "<user>",
String url = db.getMetaData().getURL();
String[] url2 = url.split(":");
Platform platform = PlatformFactory.createNewPlatformInstance(url2[1]);
File file = new File(getClass().getResource("/lakon-db-neu.xml").getPath());

Database database = new DatabaseIO().read(file);
--- cut ---

The Database ist first time created with

--- cut ---
platform.createTables(db, database, false, true);
--- cut ---

The Alter ist done by

--- cut ---
platform.alterTables(db, database, true, true, true);
--- cut ---

The PG-Jdbc driver ist version 74.215.jdbc3

The Database Version is 7.4.2

The same Problem exists with HsqlDB 1.8.0

I think, that all the Informations i have.

> Creating Foreign Keys before creating the matching Tables
> ---------------------------------------------------------
>          Key: DDLUTILS-39
>          URL: http://issues.apache.org/jira/browse/DDLUTILS-39
>      Project: DdlUtils
>         Type: Bug
>  Environment: Windows 2000, XP, Linux, Eclipse, PostgreSQL, hsqldb, MySQL
>     Reporter: Robert Einsle
>     Assignee: Thomas Dudziak
>     Priority: Minor
>  Attachments: lakon-db-neu.xml, lakon-db.xml
> While testing on an Postgres-Database, we have the Problem DDL-Utils works thrait throu
the xml-Inputfile, and alters the Database. But we have an definition of an foreign key insertet
in an table above the creation-rule of the table itself. So, DDL-Utils first tries to alter
the Database, inserting the Foreign-key, fails, then creates the table. So, we have 2 choices,
sorting the xml-inputfile for the foreign keys, or DDL-Utils let to create foreign keys after
creating the needed Tables. For my choices i would prefer the second solution. Can i do anything

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:

View raw message