Sybase support not correct

Hi,

I am using generating sybase db statements using liquibase jar.
For generated statements look like:
CREATE TABLE [AA774] (ID INT IDENTITY  NOT NULL, V1 INT NULL, CONSTRAINT [PKCN_AA774] PRIMARY KEY (ID))
(Class used to generate this statement is CreateTableStatement)

CREATE UNIQUE INDEX [X1_AA774] ON AA774
(Class used to generate this statement is CreateTableStatement)

DROP INDEX [AA774].[X1_AA774]
(Class used to generate this statement is DropIndexStatement)

DROP VIEW [V_AA774]
(Class used to generate this statement is DropViewStatement)

ALTER TABLE [AA774] ADD F4 INT NULL
(Class used to generate this statement is AddColumnStatement)

CREATE VIEW [V_AA774] AS SELECT * FROM AA774
(Class used to generate this statement is CreateViewStatement)

All the above statemens use square brackets around the table/view/constraint name. This does not work in Sybase.
Is there any fix coming for this in the next version of liquibase?

Also there is another problem here, for SybaseDatabase.getIntType() gives “INT”, it should be NUMERIC.

Regards,
Usha.

Thanks for pointing it out.  What do they use for an object quote charactor?  (I did not add the sybase support, and don’t have sybase installed currently)

I’ll fix the “int” column as well.

I added http://liquibase.jira.com/browse/CORE-413 and http://liquibase.jira.com/browse/CORE-414

Nathan, i noticed you created a new Jira issue for this, but it is basically the same issue as http://liquibase.jira.com/browse/CORE-398. Maybe all datatype conversion should be checked.

Yes, they should all be checked. I want to make sure that the issues are fixed in the 1.9 branch as well as the 2.0 branch that should have a better-abstracted type system. 

Nathan

Hello,

I’m starting to use liquibase 1.9.4 on Sybase Sql Anywhere and Sybase Adaptive Server Enterprise for production use.
We have to maintain near 300 Sybase Sql Anywhere databases replicated on Sybase Adaptive Server Enterprise database.
Liquibase seems to be the perfect tool for us.

At the moment everything seems to be ok with sql anywhere.

There are problems with Adaptive Server Enterprise :
SybaseDatabase should probably not extend MSSQLDatabase. ( I know MSSQL comes from Sybase they don’t have any common developpement team )
ASE does not handle Dates as MSSQL. For ASE, the getDateLiteral method must not be overridden.
When using jconnect, liquibase does not recognize the database implementation as a correct implementation.

I made a copy of MSSQLDatabase.java to SybaseDatabase.java, then I wrote some little modifications in order to make it work with both jtds and jconnect ( version 6 ).

After a recompilation, a first changeset went ok ( it was an insert ).

If someone is interested in those modifications, I can send the modified class source file.

If you wanted to send me the changes (nathan [at] voxland.net) I can get them applied.  I agree that SybaseDatabase should not extends MSSQLDatabase.  It was done to get at least something going for sybase, but the are different enough that they should be completely separate.

Nathan

source code sent :wink:

Thanks, I got it and will get it applied.

Nathan