insert.setSQL(buf.toString()); // ensure at least one row in table
script.addStatement(insert);
exec.getScriptHolder().addScript(script);
upgrade(exec, null, null); // insert a record into the table to test altering an actual value
AlterColumnStep step = new AlterColumnStep();
ColumnOutline outline = new ColumnOutline("value");
outline.setType(to);
if (bToLOB)
{
outline.setAllocation(Column.LOCATOR);
}
else
{
outline.setAllocation( // set Column.FIXED/Column.VARYING as per original column
(column1.getAllocation() == Column.LOCATOR) ? Column.VARYING : column1.getAllocation());
}
outline.setNullable(Boolean.FALSE);
if (to == Primitive.BINARY || to == Primitive.STRING)
{
outline.setPrecision(100);
outline.setCaseInsensitive(Boolean.FALSE);
}
step.setOutline(outline);
step.setTableName(m_doubleColTableStep.getName());
try
{
schema = upgrade(step, schema, null);
}