Hello; I wanted to confirm something, first, and then ask a question about something else.
First, I see that InformixDatabase.java has changed to return “false” from the supportsSchemas() call. Did that happen between 2.0.0 and 2.0.1?
Next, the InformixDatabase.java does some clever things to fake a default schema if none is provided. Informix is one of those DBMSs that doesn’t have schemas per se, it has table owners. So there’s some code in there that silently sets Liquibase’s notion of the default schema name to the name of the <span references (left over from when Liquibase didn’t have a default schema name passed through from the command line, or something like that–but I can’t change them now because they’ll break the checksums) will continue to work?
Or: perhaps someone who knows about the InformixDatabase support can comment on what the evils would be if I simply re-overrode the supportsSchemas method so that it returns true?
I’ve just been taking code patches from people that know informix, I don’t know much about it myself. I’ll send a message to the person that submitted the patches to have them reply to the thread.
It is intended to allow guests to post currently. I’m trying to keep the barrier to getting help as low as possible, especially since posting seemed not as intuitive as it should be if you are not logged in. I figured I’d allow guest posting for now and see how it goes.
first some background. I started with the Informix support quite a while ago (2 years?). In these times I didn’t know that much about Informix. Because I am a fan of contiunuous integration and automation and my company uses Informix, I thought it would be a nice finger exercise, with maybe some benefit in the future.
2 Months ago, I checked Liquibase again and saw, that there was still no “official” Informix support. So I started to get all the tests green again (after the big internal refactoring in Liquibase 2.0) and read the documentation of Informix more precisely. I realized that Informix doesn’t support schemas and changed it in InformixDatabase.java.
I am sorry, but I cannot tell you what the impact of the “re-overrode” would be.
Is it possible to rerun the complete changelog (with the removed schemaName attributes) on a fresh database and then insert the data to it? Then you would have new generated checksums.
It would be great if someone actually using Liquibase and Informix would join me to get the Informix support right and better. I only use the integration tests.
I’m very happy to dive in and start thrashing away in the Informix support.
In the meantime, I’ve used the liquibase.ext facility to write my own implementation. I overrode the supportsSchema to return true, and don’t see any ill effects. Part of this is because I am very much aware of the fact that Informix–just like MS SQL Server–uses an owner for its schema component. So as long as you have in the back of your head that a table’s schema is going to actually be its owner, you can do OK.
I think it is correct that the InformixDatabase returns false for supportsSchemas, because strictly speaking that’s true–it doesn’t support schemas, it supports owners.
The other thing I’ve done in my own implementation is to examine VARCHAR data types, and to silently turn them into LVARCHARs if the precision (length) is greater than 255. This is because Informix is one of the last databases standing (I’m sure there are others, but not many) where VARCHARs are limited to 255 or less.
One issue that could arise: It is allowed to have several “schemas”, but all the tables have to have unique names, even though they are in different “schemas”.
Hello. I got here through some google keyword alert. I’m not related to Liquibase, but I’m very involved with Informix. Meaning, I’m available for any specific Informix issues you may have. Feel free to contact me at domusonline at gmail.com
OK, that is indeed rather odd. But we need to look in the source code to find out where supportsSchemas() and then support more stringent validation of a changelog–if, during validation, duplicate table names are detected, then we fail at that point? Let me look into this more.
I should mention that it looks like Informix supportsSchemas() call is incorrect.
Yeah, it is correct that you can create schemas, but the names of the tables have to be unique among all tables, even if they other are in different schemas.
If you have for example a table named foobar in schema1, then you cannot create a table named foobar in another schema2. This is different from all other databases (that I know) using schemas.