db-ddlutils-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Douglas Granzotto (Infoarte)" <dgranzo...@infoarte.trix.net>
Subject Re: Plataform.getAlterTablesSql results
Date Wed, 14 Jun 2006 18:06:20 GMT
----- Original Message -----
From: "Thomas Dudziak" <tomdzk@gmail.com>
To: <ddlutils-user@db.apache.org>
Sent: Wednesday, June 14, 2006 12:00 PM
Subject: Re: Plataform.getAlterTablesSql results


> On 6/14/06, Douglas Granzotto (Infoarte) <dgranzotto@infoarte.trix.net>
wrote:
>
> > I am using Firebird 1.5, and this supports add column.
> > So much that I removed the unnecessary commands,
> > only remaining:
> >
> > > ALTER TABLE IPI
> > >     ADD CLASSFISCAL VARCHAR(12);
> > >
> > > ALTER TABLE IPI
> > >     ALTER CLASSFISCAL POSITION 4;
> >
> > And that's ran ok, the modification was executed with success.
>
> Are you sure that you're using the latest DdlUtils source ? I've added
> support for Firebird specific statements about two weeks ago:
>
>
http://svn.apache.org/viewvc/db/ddlutils/trunk/src/java/org/apache/ddlutils/
platform/firebird/FirebirdBuilder.java?view=markup
>
> (in method processChange(Database, Database, AddColumnChange)).
>
> Tom
>

Yes, I got the sources on 06/08/2006.
The FirebirdBuider.java class is ok.
The script generated by plataform.getAlterTablesSql(Database desiredDb,
boolean doDrops, boolean modifyColumns, boolean continueOnError)  works
well.
The only problem are these lines, that I think are unnecessary.

CREATE TABLE IPI_
(
    IPICOD VARCHAR(2) NOT NULL,
    IPIDESC VARCHAR(30),
    TIPO INTEGER,
    CLASSFISCAL VARCHAR(12),
    VERSAO INTEGER,
    PRIMARY KEY (IPICOD)
);

INSERT INTO IPI_ (CLASSFISCAL,IPICOD,IPIDESC,TIPO,VERSAO) SELECT
CLASSFISCAL,IPICOD,IPIDESC,TIPO,VERSAO
FROM IPI;

DROP TABLE IPI;

CREATE TABLE IPI
(
    IPICOD VARCHAR(2) NOT NULL,
    IPIDESC VARCHAR(30),
    TIPO INTEGER,
    CLASSFISCAL VARCHAR(12),
    VERSAO INTEGER,
    PRIMARY KEY (IPICOD)
);

CREATE INDEX IX_IPI_1 ON IPI (IPIDESC);

INSERT INTO IPI (IPICOD,IPIDESC,TIPO,CLASSFISCAL,VERSAO) SELECT
IPICOD,IPIDESC,TIPO,CLASSFISCAL,VERSAO
FROM IPI_;

DROP TABLE IPI_;


Douglas


Mime
View raw message