add liter

This commit is contained in:
gowthaman 2024-06-04 12:51:01 +05:30
parent 75495afd73
commit 2ee82a2eed
2 changed files with 15 additions and 0 deletions

View File

@ -0,0 +1,7 @@
-- drop dependencies
alter table product drop constraint if exists ck_product_uom;
-- apply alter tables
alter table purchase_order alter column all_loading_site set default false;
alter table purchase_order alter column all_unloading_site set default false;
-- apply post alter
alter table product add constraint ck_product_uom check ( uom in ('KG','CFT','TON','LTR','NUMBER','MTR','BOX','CUM','PACKET','ALL','NOS','LITER'));

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<migration xmlns="http://ebean-orm.github.io/xml/ns/dbmigration">
<changeSet type="apply">
<alterColumn columnName="uom" tableName="product" checkConstraint="check ( uom in ('KG','CFT','TON','LTR','NUMBER','MTR','BOX','CUM','PACKET','ALL','NOS','LITER'))" checkConstraintName="ck_product_uom"/>
<alterColumn columnName="all_loading_site" tableName="purchase_order" defaultValue="false"/>
<alterColumn columnName="all_unloading_site" tableName="purchase_order" defaultValue="false"/>
</changeSet>
</migration>