You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ddlutils-dev@db.apache.org by "Adrián Romero (JIRA)" <ji...@apache.org> on 2007/07/02 12:53:04 UTC

[jira] Created: (DDLUTILS-178) ModelException thrown when reading columns with "special" names

ModelException thrown when reading columns with "special" names
---------------------------------------------------------------

                 Key: DDLUTILS-178
                 URL: https://issues.apache.org/jira/browse/DDLUTILS-178
             Project: DdlUtils
          Issue Type: Bug
          Components: Core - PostgreSql
    Affects Versions: 1.0 RC2
         Environment: PostgreSQL 8.2 on Ubuntu 7.04. Java 6.
            Reporter: Adrián Romero 
            Assignee: Thomas Dudziak


Trying to execute the method "readModelFromDatabase" a ModelException is thrown. The database has only one table with a field named "year". If this field is renamed by another name it works ok. The field "year" appears in the pgAdmin tool with quotes. This must be the reason why DDLutils throws the ModelException.

This is the exception thrown:

org.apache.ddlutils.model.ModelException: The index ad_sequence_no_key in table ad_sequence_no references the undefined column "year"
        at org.apache.ddlutils.model.Database.initialize(Database.java:393)
        at org.apache.ddlutils.platform.JdbcModelReader.getDatabase(JdbcModelReader.java:484)
        at org.apache.ddlutils.platform.JdbcModelReader.getDatabase(JdbcModelReader.java:432)
        at org.apache.ddlutils.platform.PlatformImplBase.readModelFromDatabase(PlatformImplBase.java:1884)
        at org.apache.ddlutils.platform.PlatformImplBase.readModelFromDatabase(PlatformImplBase.java:1869)
        at org.openbravo.ddl.Test.main(Test.java:52)

The database was previously populated with the following XML::

<?xml version="1.0"?>
<!DOCTYPE database SYSTEM "http://db.apache.org/torque/dtd/database">
  <database name="openbravo-tests">
    <table name="ad_sequence_no">
      <column name="ad_sequence_id" primaryKey="false" required="true" type="NUMERIC" size="10" autoIncrement="false"/>
      <column name="year" primaryKey="false" required="true" type="VARCHAR" size="4" default="0000" autoIncrement="false"/>
      <column name="ad_client_id" primaryKey="false" required="true" type="NUMERIC" size="10" autoIncrement="false"/>
      <unique name="ad_sequence_no_key">
        <unique-column name="ad_sequence_id"/>
        <unique-column name="year"/>
      </unique>
    </table>
</database> 

And in the pgAdmin tool, the table definition is: 

-- Table: ad_sequence_no

-- DROP TABLE ad_sequence_no;

CREATE TABLE ad_sequence_no
(
  ad_sequence_id numeric(10) NOT NULL,
  "year" varchar(4) NOT NULL DEFAULT '0000'::character varying,
  ad_client_id numeric(10) NOT NULL
) 
WITHOUT OIDS;
ALTER TABLE ad_sequence_no OWNER TO tad;


-- Index: ad_sequence_no_key

-- DROP INDEX ad_sequence_no_key;

CREATE UNIQUE INDEX ad_sequence_no_key
  ON ad_sequence_no
  USING btree
  (ad_sequence_id, "year");




-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (DDLUTILS-178) ModelException thrown when reading columns with "special" names

Posted by "Adrián Romero (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DDLUTILS-178?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Adrián Romero  updated DDLUTILS-178:
------------------------------------

    Attachment: remove-quotes.patch

This is a quick and dirty patch that fixes the problem for PostgreSQL

> ModelException thrown when reading columns with "special" names
> ---------------------------------------------------------------
>
>                 Key: DDLUTILS-178
>                 URL: https://issues.apache.org/jira/browse/DDLUTILS-178
>             Project: DdlUtils
>          Issue Type: Bug
>          Components: Core - PostgreSql
>    Affects Versions: 1.0 RC2
>         Environment: PostgreSQL 8.2 on Ubuntu 7.04. Java 6.
>            Reporter: Adrián Romero 
>            Assignee: Thomas Dudziak
>         Attachments: remove-quotes.patch
>
>
> Trying to execute the method "readModelFromDatabase" a ModelException is thrown. The database has only one table with a field named "year". If this field is renamed by another name it works ok. The field "year" appears in the pgAdmin tool with quotes. This must be the reason why DDLutils throws the ModelException.
> This is the exception thrown:
> org.apache.ddlutils.model.ModelException: The index ad_sequence_no_key in table ad_sequence_no references the undefined column "year"
>         at org.apache.ddlutils.model.Database.initialize(Database.java:393)
>         at org.apache.ddlutils.platform.JdbcModelReader.getDatabase(JdbcModelReader.java:484)
>         at org.apache.ddlutils.platform.JdbcModelReader.getDatabase(JdbcModelReader.java:432)
>         at org.apache.ddlutils.platform.PlatformImplBase.readModelFromDatabase(PlatformImplBase.java:1884)
>         at org.apache.ddlutils.platform.PlatformImplBase.readModelFromDatabase(PlatformImplBase.java:1869)
>         at org.openbravo.ddl.Test.main(Test.java:52)
> The database was previously populated with the following XML::
> <?xml version="1.0"?>
> <!DOCTYPE database SYSTEM "http://db.apache.org/torque/dtd/database">
>   <database name="openbravo-tests">
>     <table name="ad_sequence_no">
>       <column name="ad_sequence_id" primaryKey="false" required="true" type="NUMERIC" size="10" autoIncrement="false"/>
>       <column name="year" primaryKey="false" required="true" type="VARCHAR" size="4" default="0000" autoIncrement="false"/>
>       <column name="ad_client_id" primaryKey="false" required="true" type="NUMERIC" size="10" autoIncrement="false"/>
>       <unique name="ad_sequence_no_key">
>         <unique-column name="ad_sequence_id"/>
>         <unique-column name="year"/>
>       </unique>
>     </table>
> </database> 
> And in the pgAdmin tool, the table definition is: 
> -- Table: ad_sequence_no
> -- DROP TABLE ad_sequence_no;
> CREATE TABLE ad_sequence_no
> (
>   ad_sequence_id numeric(10) NOT NULL,
>   "year" varchar(4) NOT NULL DEFAULT '0000'::character varying,
>   ad_client_id numeric(10) NOT NULL
> ) 
> WITHOUT OIDS;
> ALTER TABLE ad_sequence_no OWNER TO tad;
> -- Index: ad_sequence_no_key
> -- DROP INDEX ad_sequence_no_key;
> CREATE UNIQUE INDEX ad_sequence_no_key
>   ON ad_sequence_no
>   USING btree
>   (ad_sequence_id, "year");

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (DDLUTILS-178) ModelException thrown when reading columns with "special" names

Posted by "Thomas Dudziak (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DDLUTILS-178?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Thomas Dudziak updated DDLUTILS-178:
------------------------------------

    Fix Version/s: 1.1

> ModelException thrown when reading columns with "special" names
> ---------------------------------------------------------------
>
>                 Key: DDLUTILS-178
>                 URL: https://issues.apache.org/jira/browse/DDLUTILS-178
>             Project: DdlUtils
>          Issue Type: Bug
>          Components: Core - PostgreSql
>    Affects Versions: 1.0 RC2
>         Environment: PostgreSQL 8.2 on Ubuntu 7.04. Java 6.
>            Reporter: Adrián Romero 
>            Assignee: Thomas Dudziak
>             Fix For: 1.1
>
>         Attachments: remove-quotes.patch
>
>
> Trying to execute the method "readModelFromDatabase" a ModelException is thrown. The database has only one table with a field named "year". If this field is renamed by another name it works ok. The field "year" appears in the pgAdmin tool with quotes. This must be the reason why DDLutils throws the ModelException.
> This is the exception thrown:
> org.apache.ddlutils.model.ModelException: The index ad_sequence_no_key in table ad_sequence_no references the undefined column "year"
>         at org.apache.ddlutils.model.Database.initialize(Database.java:393)
>         at org.apache.ddlutils.platform.JdbcModelReader.getDatabase(JdbcModelReader.java:484)
>         at org.apache.ddlutils.platform.JdbcModelReader.getDatabase(JdbcModelReader.java:432)
>         at org.apache.ddlutils.platform.PlatformImplBase.readModelFromDatabase(PlatformImplBase.java:1884)
>         at org.apache.ddlutils.platform.PlatformImplBase.readModelFromDatabase(PlatformImplBase.java:1869)
>         at org.openbravo.ddl.Test.main(Test.java:52)
> The database was previously populated with the following XML::
> <?xml version="1.0"?>
> <!DOCTYPE database SYSTEM "http://db.apache.org/torque/dtd/database">
>   <database name="openbravo-tests">
>     <table name="ad_sequence_no">
>       <column name="ad_sequence_id" primaryKey="false" required="true" type="NUMERIC" size="10" autoIncrement="false"/>
>       <column name="year" primaryKey="false" required="true" type="VARCHAR" size="4" default="0000" autoIncrement="false"/>
>       <column name="ad_client_id" primaryKey="false" required="true" type="NUMERIC" size="10" autoIncrement="false"/>
>       <unique name="ad_sequence_no_key">
>         <unique-column name="ad_sequence_id"/>
>         <unique-column name="year"/>
>       </unique>
>     </table>
> </database> 
> And in the pgAdmin tool, the table definition is: 
> -- Table: ad_sequence_no
> -- DROP TABLE ad_sequence_no;
> CREATE TABLE ad_sequence_no
> (
>   ad_sequence_id numeric(10) NOT NULL,
>   "year" varchar(4) NOT NULL DEFAULT '0000'::character varying,
>   ad_client_id numeric(10) NOT NULL
> ) 
> WITHOUT OIDS;
> ALTER TABLE ad_sequence_no OWNER TO tad;
> -- Index: ad_sequence_no_key
> -- DROP INDEX ad_sequence_no_key;
> CREATE UNIQUE INDEX ad_sequence_no_key
>   ON ad_sequence_no
>   USING btree
>   (ad_sequence_id, "year");

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (DDLUTILS-178) ModelException thrown when reading columns with "special" names

Posted by "Adrián Romero (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DDLUTILS-178?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12509640 ] 

Adrián Romero  commented on DDLUTILS-178:
-----------------------------------------

Yes. This is the sample source code: 

        BasicDataSource ds = new BasicDataSource();
        ds.setDriverClassName("org.postgresql.Driver");
        ds.setUrl("jdbc:postgresql://localhost:5432/openbravo230");
        ds.setUsername("tad");
        ds.setPassword("tad");  
        
        try {        
            Platform platform = PlatformFactory.createNewPlatformInstance(ds);

            platform.setDelimitedIdentifierModeOn(true);
            
            Database db = platform.readModelFromDatabase("openbravo230");                     
            
            Writer sw = new OutputStreamWriter(new FileOutputStream(new File("/home/adrian/openbravo230.xml")));
            new DatabaseIO().write(db, sw);
            sw.close();
            
        } catch (Exception e) {
            e.printStackTrace();
        }

> ModelException thrown when reading columns with "special" names
> ---------------------------------------------------------------
>
>                 Key: DDLUTILS-178
>                 URL: https://issues.apache.org/jira/browse/DDLUTILS-178
>             Project: DdlUtils
>          Issue Type: Bug
>          Components: Core - PostgreSql
>    Affects Versions: 1.0 RC2
>         Environment: PostgreSQL 8.2 on Ubuntu 7.04. Java 6.
>            Reporter: Adrián Romero 
>            Assignee: Thomas Dudziak
>
> Trying to execute the method "readModelFromDatabase" a ModelException is thrown. The database has only one table with a field named "year". If this field is renamed by another name it works ok. The field "year" appears in the pgAdmin tool with quotes. This must be the reason why DDLutils throws the ModelException.
> This is the exception thrown:
> org.apache.ddlutils.model.ModelException: The index ad_sequence_no_key in table ad_sequence_no references the undefined column "year"
>         at org.apache.ddlutils.model.Database.initialize(Database.java:393)
>         at org.apache.ddlutils.platform.JdbcModelReader.getDatabase(JdbcModelReader.java:484)
>         at org.apache.ddlutils.platform.JdbcModelReader.getDatabase(JdbcModelReader.java:432)
>         at org.apache.ddlutils.platform.PlatformImplBase.readModelFromDatabase(PlatformImplBase.java:1884)
>         at org.apache.ddlutils.platform.PlatformImplBase.readModelFromDatabase(PlatformImplBase.java:1869)
>         at org.openbravo.ddl.Test.main(Test.java:52)
> The database was previously populated with the following XML::
> <?xml version="1.0"?>
> <!DOCTYPE database SYSTEM "http://db.apache.org/torque/dtd/database">
>   <database name="openbravo-tests">
>     <table name="ad_sequence_no">
>       <column name="ad_sequence_id" primaryKey="false" required="true" type="NUMERIC" size="10" autoIncrement="false"/>
>       <column name="year" primaryKey="false" required="true" type="VARCHAR" size="4" default="0000" autoIncrement="false"/>
>       <column name="ad_client_id" primaryKey="false" required="true" type="NUMERIC" size="10" autoIncrement="false"/>
>       <unique name="ad_sequence_no_key">
>         <unique-column name="ad_sequence_id"/>
>         <unique-column name="year"/>
>       </unique>
>     </table>
> </database> 
> And in the pgAdmin tool, the table definition is: 
> -- Table: ad_sequence_no
> -- DROP TABLE ad_sequence_no;
> CREATE TABLE ad_sequence_no
> (
>   ad_sequence_id numeric(10) NOT NULL,
>   "year" varchar(4) NOT NULL DEFAULT '0000'::character varying,
>   ad_client_id numeric(10) NOT NULL
> ) 
> WITHOUT OIDS;
> ALTER TABLE ad_sequence_no OWNER TO tad;
> -- Index: ad_sequence_no_key
> -- DROP INDEX ad_sequence_no_key;
> CREATE UNIQUE INDEX ad_sequence_no_key
>   ON ad_sequence_no
>   USING btree
>   (ad_sequence_id, "year");

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (DDLUTILS-178) ModelException thrown when reading columns with "special" names

Posted by "Thomas Dudziak (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DDLUTILS-178?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Thomas Dudziak resolved DDLUTILS-178.
-------------------------------------

    Resolution: Cannot Reproduce

This seems to be a bug in the JDBC driver. It works fine for me without the patch using DdlUtils 1.1 (though the model reading logic hasn't changed in 1.1) and PostgreSQL 8.2 using the JDBC driver 8.2-506.jdbc3, both with and without delimited identifier mode.

> ModelException thrown when reading columns with "special" names
> ---------------------------------------------------------------
>
>                 Key: DDLUTILS-178
>                 URL: https://issues.apache.org/jira/browse/DDLUTILS-178
>             Project: DdlUtils
>          Issue Type: Bug
>          Components: Core - PostgreSql
>    Affects Versions: 1.0 RC2
>         Environment: PostgreSQL 8.2 on Ubuntu 7.04. Java 6.
>            Reporter: Adrián Romero 
>            Assignee: Thomas Dudziak
>             Fix For: 1.1
>
>         Attachments: remove-quotes.patch
>
>
> Trying to execute the method "readModelFromDatabase" a ModelException is thrown. The database has only one table with a field named "year". If this field is renamed by another name it works ok. The field "year" appears in the pgAdmin tool with quotes. This must be the reason why DDLutils throws the ModelException.
> This is the exception thrown:
> org.apache.ddlutils.model.ModelException: The index ad_sequence_no_key in table ad_sequence_no references the undefined column "year"
>         at org.apache.ddlutils.model.Database.initialize(Database.java:393)
>         at org.apache.ddlutils.platform.JdbcModelReader.getDatabase(JdbcModelReader.java:484)
>         at org.apache.ddlutils.platform.JdbcModelReader.getDatabase(JdbcModelReader.java:432)
>         at org.apache.ddlutils.platform.PlatformImplBase.readModelFromDatabase(PlatformImplBase.java:1884)
>         at org.apache.ddlutils.platform.PlatformImplBase.readModelFromDatabase(PlatformImplBase.java:1869)
>         at org.openbravo.ddl.Test.main(Test.java:52)
> The database was previously populated with the following XML::
> <?xml version="1.0"?>
> <!DOCTYPE database SYSTEM "http://db.apache.org/torque/dtd/database">
>   <database name="openbravo-tests">
>     <table name="ad_sequence_no">
>       <column name="ad_sequence_id" primaryKey="false" required="true" type="NUMERIC" size="10" autoIncrement="false"/>
>       <column name="year" primaryKey="false" required="true" type="VARCHAR" size="4" default="0000" autoIncrement="false"/>
>       <column name="ad_client_id" primaryKey="false" required="true" type="NUMERIC" size="10" autoIncrement="false"/>
>       <unique name="ad_sequence_no_key">
>         <unique-column name="ad_sequence_id"/>
>         <unique-column name="year"/>
>       </unique>
>     </table>
> </database> 
> And in the pgAdmin tool, the table definition is: 
> -- Table: ad_sequence_no
> -- DROP TABLE ad_sequence_no;
> CREATE TABLE ad_sequence_no
> (
>   ad_sequence_id numeric(10) NOT NULL,
>   "year" varchar(4) NOT NULL DEFAULT '0000'::character varying,
>   ad_client_id numeric(10) NOT NULL
> ) 
> WITHOUT OIDS;
> ALTER TABLE ad_sequence_no OWNER TO tad;
> -- Index: ad_sequence_no_key
> -- DROP INDEX ad_sequence_no_key;
> CREATE UNIQUE INDEX ad_sequence_no_key
>   ON ad_sequence_no
>   USING btree
>   (ad_sequence_id, "year");

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (DDLUTILS-178) ModelException thrown when reading columns with "special" names

Posted by "Thomas Dudziak (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DDLUTILS-178?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12509619 ] 

Thomas Dudziak commented on DDLUTILS-178:
-----------------------------------------

Did you run this with delimited identifier mode turned on ?

> ModelException thrown when reading columns with "special" names
> ---------------------------------------------------------------
>
>                 Key: DDLUTILS-178
>                 URL: https://issues.apache.org/jira/browse/DDLUTILS-178
>             Project: DdlUtils
>          Issue Type: Bug
>          Components: Core - PostgreSql
>    Affects Versions: 1.0 RC2
>         Environment: PostgreSQL 8.2 on Ubuntu 7.04. Java 6.
>            Reporter: Adrián Romero 
>            Assignee: Thomas Dudziak
>
> Trying to execute the method "readModelFromDatabase" a ModelException is thrown. The database has only one table with a field named "year". If this field is renamed by another name it works ok. The field "year" appears in the pgAdmin tool with quotes. This must be the reason why DDLutils throws the ModelException.
> This is the exception thrown:
> org.apache.ddlutils.model.ModelException: The index ad_sequence_no_key in table ad_sequence_no references the undefined column "year"
>         at org.apache.ddlutils.model.Database.initialize(Database.java:393)
>         at org.apache.ddlutils.platform.JdbcModelReader.getDatabase(JdbcModelReader.java:484)
>         at org.apache.ddlutils.platform.JdbcModelReader.getDatabase(JdbcModelReader.java:432)
>         at org.apache.ddlutils.platform.PlatformImplBase.readModelFromDatabase(PlatformImplBase.java:1884)
>         at org.apache.ddlutils.platform.PlatformImplBase.readModelFromDatabase(PlatformImplBase.java:1869)
>         at org.openbravo.ddl.Test.main(Test.java:52)
> The database was previously populated with the following XML::
> <?xml version="1.0"?>
> <!DOCTYPE database SYSTEM "http://db.apache.org/torque/dtd/database">
>   <database name="openbravo-tests">
>     <table name="ad_sequence_no">
>       <column name="ad_sequence_id" primaryKey="false" required="true" type="NUMERIC" size="10" autoIncrement="false"/>
>       <column name="year" primaryKey="false" required="true" type="VARCHAR" size="4" default="0000" autoIncrement="false"/>
>       <column name="ad_client_id" primaryKey="false" required="true" type="NUMERIC" size="10" autoIncrement="false"/>
>       <unique name="ad_sequence_no_key">
>         <unique-column name="ad_sequence_id"/>
>         <unique-column name="year"/>
>       </unique>
>     </table>
> </database> 
> And in the pgAdmin tool, the table definition is: 
> -- Table: ad_sequence_no
> -- DROP TABLE ad_sequence_no;
> CREATE TABLE ad_sequence_no
> (
>   ad_sequence_id numeric(10) NOT NULL,
>   "year" varchar(4) NOT NULL DEFAULT '0000'::character varying,
>   ad_client_id numeric(10) NOT NULL
> ) 
> WITHOUT OIDS;
> ALTER TABLE ad_sequence_no OWNER TO tad;
> -- Index: ad_sequence_no_key
> -- DROP INDEX ad_sequence_no_key;
> CREATE UNIQUE INDEX ad_sequence_no_key
>   ON ad_sequence_no
>   USING btree
>   (ad_sequence_id, "year");

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (DDLUTILS-178) ModelException thrown when reading columns with "special" names

Posted by "sunil (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DDLUTILS-178?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12913929#action_12913929 ] 

sunil commented on DDLUTILS-178:
--------------------------------

Dear Thomas Dudziak

Can u send me the ddutils-1.1.jar
please its urgent for me
b'coz i have same problem while configuring symmetricDS2.0.x version
in postgresql 8.0 and 8.2 primary key shows index as ("first column",second)
means column name in ("")
and throws the same exception

waiting for ur reply 

> ModelException thrown when reading columns with "special" names
> ---------------------------------------------------------------
>
>                 Key: DDLUTILS-178
>                 URL: https://issues.apache.org/jira/browse/DDLUTILS-178
>             Project: DdlUtils
>          Issue Type: Bug
>          Components: Core - PostgreSql
>    Affects Versions: 1.0 RC2
>         Environment: PostgreSQL 8.2 on Ubuntu 7.04. Java 6.
>            Reporter: Adrián Romero 
>            Assignee: Thomas Dudziak
>             Fix For: 1.1
>
>         Attachments: remove-quotes.patch
>
>
> Trying to execute the method "readModelFromDatabase" a ModelException is thrown. The database has only one table with a field named "year". If this field is renamed by another name it works ok. The field "year" appears in the pgAdmin tool with quotes. This must be the reason why DDLutils throws the ModelException.
> This is the exception thrown:
> org.apache.ddlutils.model.ModelException: The index ad_sequence_no_key in table ad_sequence_no references the undefined column "year"
>         at org.apache.ddlutils.model.Database.initialize(Database.java:393)
>         at org.apache.ddlutils.platform.JdbcModelReader.getDatabase(JdbcModelReader.java:484)
>         at org.apache.ddlutils.platform.JdbcModelReader.getDatabase(JdbcModelReader.java:432)
>         at org.apache.ddlutils.platform.PlatformImplBase.readModelFromDatabase(PlatformImplBase.java:1884)
>         at org.apache.ddlutils.platform.PlatformImplBase.readModelFromDatabase(PlatformImplBase.java:1869)
>         at org.openbravo.ddl.Test.main(Test.java:52)
> The database was previously populated with the following XML::
> <?xml version="1.0"?>
> <!DOCTYPE database SYSTEM "http://db.apache.org/torque/dtd/database">
>   <database name="openbravo-tests">
>     <table name="ad_sequence_no">
>       <column name="ad_sequence_id" primaryKey="false" required="true" type="NUMERIC" size="10" autoIncrement="false"/>
>       <column name="year" primaryKey="false" required="true" type="VARCHAR" size="4" default="0000" autoIncrement="false"/>
>       <column name="ad_client_id" primaryKey="false" required="true" type="NUMERIC" size="10" autoIncrement="false"/>
>       <unique name="ad_sequence_no_key">
>         <unique-column name="ad_sequence_id"/>
>         <unique-column name="year"/>
>       </unique>
>     </table>
> </database> 
> And in the pgAdmin tool, the table definition is: 
> -- Table: ad_sequence_no
> -- DROP TABLE ad_sequence_no;
> CREATE TABLE ad_sequence_no
> (
>   ad_sequence_id numeric(10) NOT NULL,
>   "year" varchar(4) NOT NULL DEFAULT '0000'::character varying,
>   ad_client_id numeric(10) NOT NULL
> ) 
> WITHOUT OIDS;
> ALTER TABLE ad_sequence_no OWNER TO tad;
> -- Index: ad_sequence_no_key
> -- DROP INDEX ad_sequence_no_key;
> CREATE UNIQUE INDEX ad_sequence_no_key
>   ON ad_sequence_no
>   USING btree
>   (ad_sequence_id, "year");

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.