change product id type
This commit is contained in:
parent
3b5a0379cb
commit
a1751b8918
@ -629,7 +629,7 @@ fun ImportFromExcel(fileType: FileType, filePath: String) {
|
|||||||
sh.rowIterator().forEach { row ->
|
sh.rowIterator().forEach { row ->
|
||||||
if (row == null) return@forEach
|
if (row == null) return@forEach
|
||||||
//id, name, description, hsnCode, uom
|
//id, name, description, hsnCode, uom
|
||||||
val prodId = longIntFromCellHelper(row.getCell(0))
|
val prodId = stringFromCellHelper(row.getCell(0))
|
||||||
val prodName = stringFromCellHelper(row.getCell(1))
|
val prodName = stringFromCellHelper(row.getCell(1))
|
||||||
val prodDesc = stringFromCellHelper(row.getCell(2))
|
val prodDesc = stringFromCellHelper(row.getCell(2))
|
||||||
val prodHsnCode = stringFromCellHelper(row.getCell(3))
|
val prodHsnCode = stringFromCellHelper(row.getCell(3))
|
||||||
|
|||||||
@ -318,7 +318,7 @@ open class Product : BaseTenantModel() {
|
|||||||
this.uom = updatedProduct.uom
|
this.uom = updatedProduct.uom
|
||||||
}
|
}
|
||||||
|
|
||||||
var id: Long? = null
|
var id: String? = null
|
||||||
var name: String = ""
|
var name: String = ""
|
||||||
var description: String = ""
|
var description: String = ""
|
||||||
var hsnCode: String = ""
|
var hsnCode: String = ""
|
||||||
|
|||||||
2
src/main/resources/dbmigration/1.24.sql
Normal file
2
src/main/resources/dbmigration/1.24.sql
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
-- apply alter tables
|
||||||
|
alter table product alter column id type varchar(255) using id::varchar(255);
|
||||||
6
src/main/resources/dbmigration/model/1.24.model.xml
Normal file
6
src/main/resources/dbmigration/model/1.24.model.xml
Normal 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>
|
||||||
Loading…
x
Reference in New Issue
Block a user