Search in sources :

Example 6 with ClobType

use of liquibase.datatype.core.ClobType in project liquibase by liquibase.

the class ClobTypeTest method mssqlTextToVarcharNoConvertTest.

@Test
public void mssqlTextToVarcharNoConvertTest() throws Exception {
    Scope.child(GlobalConfiguration.CONVERT_DATA_TYPES.getKey(), false, () -> {
        ClobType ct = new ClobType();
        ct.finishInitialization("Text");
        DatabaseDataType dbType = ct.toDatabaseDataType(new MSSQLDatabase());
        assertEquals("varchar (max)", dbType.getType());
    });
}
Also used : ClobType(liquibase.datatype.core.ClobType) MSSQLDatabase(liquibase.database.core.MSSQLDatabase) Test(org.junit.Test)

Example 7 with ClobType

use of liquibase.datatype.core.ClobType in project liquibase by liquibase.

the class ClobTypeTest method mssqlNTextToNVarcharNoConvertTest.

@Test
public void mssqlNTextToNVarcharNoConvertTest() throws Exception {
    Scope.child(GlobalConfiguration.CONVERT_DATA_TYPES.getKey(), false, () -> {
        ClobType ct = new ClobType();
        ct.finishInitialization("NText");
        DatabaseDataType dbType = ct.toDatabaseDataType(new MSSQLDatabase());
        assertEquals("nvarchar (max)", dbType.getType());
    });
}
Also used : ClobType(liquibase.datatype.core.ClobType) MSSQLDatabase(liquibase.database.core.MSSQLDatabase) Test(org.junit.Test)

Aggregations

ClobType (liquibase.datatype.core.ClobType)7 Test (org.junit.Test)7 MSSQLDatabase (liquibase.database.core.MSSQLDatabase)6 ColumnConfig (liquibase.change.ColumnConfig)1 ChangeSet (liquibase.changelog.ChangeSet)1 DatabaseChangeLog (liquibase.changelog.DatabaseChangeLog)1 LiquibaseException (liquibase.exception.LiquibaseException)1 InsertExecutablePreparedStatement (liquibase.statement.InsertExecutablePreparedStatement)1 CreateTableStatement (liquibase.statement.core.CreateTableStatement)1