package liquibase.database.typeconversion.core;

import liquibase.database.structure.type.BlobType;
import liquibase.database.structure.type.ClobType;
import liquibase.database.structure.type.DateTimeType;
import liquibase.database.Database;
import liquibase.database.core.H2Database;
import liquibase.database.core.HsqlDatabase;

public class HsqlTypeConverter extends AbstractTypeConverter {

    public int getPriority() {
        return PRIORITY_DATABASE;
    }

    public boolean supports(Database database) {
        return database instanceof HsqlDatabase;
    }


    @Override
    public ClobType getClobType() {
        return new ClobType("LONGVARCHAR");
    }

    @Override
    public BlobType getBlobType() {
        return new BlobType("LONGVARBINARY");
    }

    @Override
    public DateTimeType getDateTimeType() {
        return new DateTimeType("DATETIME");
    }
}

@@ -200,24 +200,80 @@
 eTimeType;%0D%0A
+import liquibase.database.structure.type.NVarcharType;%0D%0A
 import liqui
@@ -968,12 +968,126 @@
 %0D%0A    %7D%0D
+%0A%0D%0A    @Override%0D%0A    public NVarcharType getNVarcharType() %7B%0D%0A        return new NVarcharType(%22VARCHAR%22);%0D%0A    %7D%0D
 %0A%7D%0D%0A

CORE-904 NVARCHAR should be mapped to VARCHAR for HSQLDB