change product id type

This commit is contained in:
gowthaman.b 2024-04-28 19:06:22 +05:30
parent 3b5a0379cb
commit a1751b8918
4 changed files with 10 additions and 2 deletions

View File

@ -629,7 +629,7 @@ fun ImportFromExcel(fileType: FileType, filePath: String) {
sh.rowIterator().forEach { row ->
if (row == null) return@forEach
//id, name, description, hsnCode, uom
val prodId = longIntFromCellHelper(row.getCell(0))
val prodId = stringFromCellHelper(row.getCell(0))
val prodName = stringFromCellHelper(row.getCell(1))
val prodDesc = stringFromCellHelper(row.getCell(2))
val prodHsnCode = stringFromCellHelper(row.getCell(3))

View File

@ -318,7 +318,7 @@ open class Product : BaseTenantModel() {
this.uom = updatedProduct.uom
}
var id: Long? = null
var id: String? = null
var name: String = ""
var description: String = ""
var hsnCode: String = ""

View File

@ -0,0 +1,2 @@
-- apply alter tables
alter table product alter column id type varchar(255) using id::varchar(255);

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<migration xmlns="http://ebean-orm.github.io/xml/ns/dbmigration">
<changeSet type="apply">
<alterColumn columnName="id" tableName="product" type="varchar" currentType="bigint" currentNotnull="false"/>
</changeSet>
</migration>