58 lines
4.4 KiB
XML
58 lines
4.4 KiB
XML
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
<migration xmlns="http://ebean-orm.github.io/xml/ns/dbmigration">
|
|
<changeSet type="apply">
|
|
<createTable name="incoming_inventory" pkName="pk_incoming_inventory">
|
|
<column name="sys_pk" type="bigint" primaryKey="true"/>
|
|
<column name="deleted_on" type="localdatetime"/>
|
|
<column name="deleted_by" type="varchar"/>
|
|
<column name="current_approval_level" type="integer" defaultValue="0" notnull="true"/>
|
|
<column name="required_approval_levels" type="integer" defaultValue="0" notnull="true"/>
|
|
<column name="approval_status" type="varchar(8)" defaultValue="'APPROVED'" notnull="true" checkConstraint="check ( approval_status in ('PENDING','APPROVED','REJECTED'))" checkConstraintName="ck_incoming_inventory_approval_status"/>
|
|
<column name="tags" type="varchar[]" defaultValue="'{}'" notnull="true"/>
|
|
<column name="comments" type="jsonb" defaultValue="'[]'" notnull="true"/>
|
|
<column name="tenant_id" type="varchar" notnull="true"/>
|
|
<column name="mdn" type="varchar" notnull="true"/>
|
|
<column name="date" type="date"/>
|
|
<column name="vendor_bil_num" type="varchar" notnull="true"/>
|
|
<column name="vendor_bill_amount" type="double" notnull="true"/>
|
|
<column name="vehicle" type="varchar" notnull="true"/>
|
|
<column name="products" type="jsonb"/>
|
|
<column name="vendor_sys_pk" type="bigint" references="vendor.sys_pk" foreignKeyName="fk_incoming_inventory_vendor_sys_pk" foreignKeyIndex="ix_incoming_inventory_vendor_sys_pk"/>
|
|
<column name="deleted" type="boolean" defaultValue="false" notnull="true"/>
|
|
<column name="version" type="integer" defaultValue="1" notnull="true"/>
|
|
<column name="created_at" type="localdatetime" defaultValue="'now()'" notnull="true"/>
|
|
<column name="modified_at" type="localdatetime" defaultValue="'now()'" notnull="true"/>
|
|
<column name="created_by" type="varchar" notnull="true"/>
|
|
<column name="modified_by" type="varchar" notnull="true"/>
|
|
</createTable>
|
|
<createTable name="outgoing_inventory" pkName="pk_outgoing_inventory">
|
|
<column name="sys_pk" type="bigint" primaryKey="true"/>
|
|
<column name="deleted_on" type="localdatetime"/>
|
|
<column name="deleted_by" type="varchar"/>
|
|
<column name="current_approval_level" type="integer" defaultValue="0" notnull="true"/>
|
|
<column name="required_approval_levels" type="integer" defaultValue="0" notnull="true"/>
|
|
<column name="approval_status" type="varchar(8)" defaultValue="'APPROVED'" notnull="true" checkConstraint="check ( approval_status in ('PENDING','APPROVED','REJECTED'))" checkConstraintName="ck_outgoing_inventory_approval_status"/>
|
|
<column name="tags" type="varchar[]" defaultValue="'{}'" notnull="true"/>
|
|
<column name="comments" type="jsonb" defaultValue="'[]'" notnull="true"/>
|
|
<column name="tenant_id" type="varchar" notnull="true"/>
|
|
<column name="mrn" type="varchar" notnull="true"/>
|
|
<column name="date" type="date"/>
|
|
<column name="purpose" type="varchar"/>
|
|
<column name="out_mode" type="varchar(7)" checkConstraint="check ( out_mode in ('PERSON','VEHICLE','ALL'))" checkConstraintName="ck_outgoing_inventory_out_mode"/>
|
|
<column name="person" type="varchar"/>
|
|
<column name="vehicle" type="varchar"/>
|
|
<column name="deleted" type="boolean" defaultValue="false" notnull="true"/>
|
|
<column name="version" type="integer" defaultValue="1" notnull="true"/>
|
|
<column name="created_at" type="localdatetime" defaultValue="'now()'" notnull="true"/>
|
|
<column name="modified_at" type="localdatetime" defaultValue="'now()'" notnull="true"/>
|
|
<column name="created_by" type="varchar" notnull="true"/>
|
|
<column name="modified_by" type="varchar" notnull="true"/>
|
|
</createTable>
|
|
<addColumn tableName="product">
|
|
<column name="type" type="varchar(12)" checkConstraint="check ( type in ('RAW_MATERIAL'))" checkConstraintName="ck_product_type"/>
|
|
</addColumn>
|
|
<addColumn tableName="quotation">
|
|
<column name="taxes_included" type="boolean"/>
|
|
</addColumn>
|
|
</changeSet>
|
|
</migration> |