.addColumn(newVarcharColumnDefBuilder().setColumnName("b_description").setLimit(2000).setIsNullable(true).build())
.addColumn(newBooleanColumnDefBuilder().setColumnName("b_enabled").build())
.addColumn(newVarcharColumnDefBuilder().setColumnName("b_language").setLimit(20).setIsNullable(true).build())
- .addColumn(newVarcharColumnDefBuilder().setColumnName("b_long_name").setLimit(2000).setIsNullable(true).build())
+ .addColumn(newVarcharColumnDefBuilder().setColumnName("b_long_name").setLimit(500).setIsNullable(true).build())
.addColumn(newVarcharColumnDefBuilder().setColumnName("b_module_uuid").setLimit(50).setIsNullable(true).build())
- .addColumn(newVarcharColumnDefBuilder().setColumnName("b_module_uuid_path").setLimit(4000).setIsNullable(true).build())
- .addColumn(newVarcharColumnDefBuilder().setColumnName("b_name").setLimit(2000).setIsNullable(true).build())
+ .addColumn(newVarcharColumnDefBuilder().setColumnName("b_module_uuid_path").setLimit(1500).setIsNullable(true).build())
+ .addColumn(newVarcharColumnDefBuilder().setColumnName("b_name").setLimit(500).setIsNullable(true).build())
.addColumn(newVarcharColumnDefBuilder().setColumnName("b_path").setLimit(2000).setIsNullable(true).build())
.addColumn(newVarcharColumnDefBuilder().setColumnName("b_qualifier").setLimit(3).setIsNullable(true).build())
.build());
import org.sonar.db.version.AddColumnsBuilder;
import org.sonar.db.version.DdlChange;
-import static org.sonar.db.version.VarcharColumnDef.MAX_SIZE;
import static org.sonar.db.version.VarcharColumnDef.newVarcharColumnDefBuilder;
public class AddUuidPathColumnToProjects extends DdlChange {
@Override
public void execute(Context context) throws SQLException {
context.execute(new AddColumnsBuilder(getDialect(), TABLE_PROJECTS)
- .addColumn(newVarcharColumnDefBuilder().setColumnName("uuid_path").setLimit(MAX_SIZE).setIsNullable(true).build())
+ .addColumn(newVarcharColumnDefBuilder().setColumnName("uuid_path").setLimit(1500).setIsNullable(true).build())
.build());
}
import org.sonar.db.version.AlterColumnsBuilder;
import org.sonar.db.version.DdlChange;
-import static org.sonar.db.version.VarcharColumnDef.MAX_SIZE;
import static org.sonar.db.version.VarcharColumnDef.newVarcharColumnDefBuilder;
public class MakeUuidPathColumnNotNullOnProjects extends DdlChange {
@Override
public void execute(Context context) throws SQLException {
context.execute(new AlterColumnsBuilder(getDialect(), TABLE_PROJECTS)
- .updateColumn(newVarcharColumnDefBuilder().setColumnName("uuid_path").setLimit(MAX_SIZE).setIsNullable(false).build())
+ .updateColumn(newVarcharColumnDefBuilder().setColumnName("uuid_path").setLimit(1500).setIsNullable(false).build())
.build());
}
"ID" INTEGER NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1),
"KEE" VARCHAR(400),
"UUID" VARCHAR(50) NOT NULL,
- "UUID_PATH" VARCHAR(4000) NOT NULL,
+ "UUID_PATH" VARCHAR(1500) NOT NULL,
"ROOT_UUID" VARCHAR(50) NOT NULL,
"PROJECT_UUID" VARCHAR(50),
"MODULE_UUID" VARCHAR(50),
"B_DESCRIPTION" VARCHAR(2000),
"B_ENABLED" BOOLEAN,
"B_LANGUAGE" VARCHAR(20),
- "B_LONG_NAME" VARCHAR(2000),
+ "B_LONG_NAME" VARCHAR(500),
"B_MODULE_UUID" VARCHAR(50),
- "B_MODULE_UUID_PATH" VARCHAR(4000),
- "B_NAME" VARCHAR(2000),
+ "B_MODULE_UUID_PATH" VARCHAR(1500),
+ "B_NAME" VARCHAR(500),
"B_PATH" VARCHAR(2000),
"B_QUALIFIER" VARCHAR(3)
);
db.assertColumnDefinition(TABLE, "b_description", Types.VARCHAR, 2000, true);
db.assertColumnDefinition(TABLE, "b_enabled", Types.BOOLEAN, null, true);
db.assertColumnDefinition(TABLE, "b_language", Types.VARCHAR, 20, true);
+ db.assertColumnDefinition(TABLE, "b_long_name", Types.VARCHAR, 500, true);
db.assertColumnDefinition(TABLE, "b_module_uuid", Types.VARCHAR, 50, true);
- db.assertColumnDefinition(TABLE, "b_module_uuid_path", Types.VARCHAR, 4000, true);
- db.assertColumnDefinition(TABLE, "b_name", Types.VARCHAR, 2000, true);
- db.assertColumnDefinition(TABLE, "b_long_name", Types.VARCHAR, 2000, true);
+ db.assertColumnDefinition(TABLE, "b_module_uuid_path", Types.VARCHAR, 1500, true);
+ db.assertColumnDefinition(TABLE, "b_name", Types.VARCHAR, 500, true);
db.assertColumnDefinition(TABLE, "b_path", Types.VARCHAR, 2000, true);
db.assertColumnDefinition(TABLE, "b_qualifier", Types.VARCHAR, 3, true);
}