db-ddlutils-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin van den Bemt <mll...@mvdb.net>
Subject Re: svn commit: r365722 - /db/ddlutils/trunk/src/test/org/apache/ddlutils/io/ConstraintsTestBase.java
Date Wed, 04 Jan 2006 22:24:58 GMT

Thomas Dudziak wrote:
> On 1/4/06, Martin van den Bemt <mllist@mvdb.net> wrote:
>>If you are not busy with this, let me know, I'll start on it right away, else we both
are doing the
>>same thing.
> Already done and tested against Hsqldb, PostgreSql, Derby and McKoi :-)

Just noticed it :)

> - to make the tests simpler: I can simply compare the original model
> with an adapted model where the column datatypes are changed to the
> datatypes specified by the back mapping
> - to provide a foundation for the ALTER TABLE handling (I believe
> there are bugs in JIRA regarding this)
> By no means are the tests intended to test this ALTER TABLE handling
> though. Rather, we need specific tests.
> The interesting question now is: does MySql map VARCHAR(128) and
> VARCHAR(1024) differently, e.g. to VARCHAR vs. MEDIUMTEXT ? If yes, I
> still do not consider this a problem. After all, JDBC only asks the
> database to support VARCHAR of up to 254 length. If sizes above that
> finally map to LONGVARCHAR then that is ok to me. In fact, it might
> have been useful to define the column as LONGVARCHAR in the first
> place.

I didn't have the jdbc spec in mind. Just checked the docs of mysql and 255 (in 3.2 254) is
the max 
size. My bad here :)

>>So it will be nearly impossible to do a full roundtrip of the model. A better shot
probably is
>>roundtripping the DDL itself.
>>So read model and load model, generate DDL for both and compare the result of the
generated DDL
>>(this is  what I do at a private project of mine, to see if the db needs updating
> This might be useful for tests for the database alteration
> functionality (which IMO we still have to provide though perhaps not
> for the 1.0).

This is the part I am very interested in and using most of the time actually :)

>>If you hold off removing the mysql package for now, I will create the test with DDL
comparing based
>>on the default testcases.. And see if that will do the trick.
> If you want to add tests for the database alteration, please go ahead.
> But for the datatypes/constraints tests I would prefer if we let them
> as they are. IMO they do what they are supposed to do (though perhaps
> not more as you've shown).

Agreed on that, it was not my intention to zap them :)

> If you don't mind, then I'll finish the MySql platform (add the back
> mapping to the addNativeTypeMapping registrations) ?

No problem. Curious how much you can get running (currently have 18 failures and 3 errors)
on the 

I'll take an early nap today I think.. I will have a go at the ddl stuff tomorrow..


View raw message