src-db/database/model/tables/C_CHARGE_ACCT.xml
changeset 1605 8a0fe0193bef
parent 756 ae11e4610537
child 5551 7a30caea85b5
--- a/src-db/database/model/tables/C_CHARGE_ACCT.xml	Wed Sep 03 17:10:52 2008 +0000
+++ b/src-db/database/model/tables/C_CHARGE_ACCT.xml	Wed Sep 03 17:55:37 2008 +0000
@@ -1,19 +1,23 @@
 <?xml version="1.0"?>
   <database name="TABLE C_CHARGE_ACCT">
-    <table name="C_CHARGE_ACCT" primaryKey="C_CHARHE_ACCT_KEY">
-      <column name="C_CHARGE_ID" primaryKey="true" required="true" type="DECIMAL" size="10,0" autoIncrement="false">
+    <table name="C_CHARGE_ACCT" primaryKey="C_CHARGE_ACCT_KEY">
+      <column name="C_CHARGE_ACCT_ID" primaryKey="true" required="true" type="VARCHAR" size="32" autoIncrement="false">
+        <default/>
+        <onCreateDefault><![CDATA[get_uuid()]]></onCreateDefault>
+      </column>
+      <column name="C_CHARGE_ID" primaryKey="false" required="true" type="VARCHAR" size="32" autoIncrement="false">
         <default/>
         <onCreateDefault/>
       </column>
-      <column name="C_ACCTSCHEMA_ID" primaryKey="true" required="true" type="DECIMAL" size="10,0" autoIncrement="false">
+      <column name="C_ACCTSCHEMA_ID" primaryKey="false" required="true" type="VARCHAR" size="32" autoIncrement="false">
         <default/>
         <onCreateDefault/>
       </column>
-      <column name="AD_CLIENT_ID" primaryKey="false" required="false" type="DECIMAL" size="10,0" autoIncrement="false">
+      <column name="AD_CLIENT_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
         <default/>
         <onCreateDefault/>
       </column>
-      <column name="AD_ORG_ID" primaryKey="false" required="false" type="DECIMAL" size="10,0" autoIncrement="false">
+      <column name="AD_ORG_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
         <default/>
         <onCreateDefault/>
       </column>
@@ -25,7 +29,7 @@
         <default><![CDATA[SYSDATE]]></default>
         <onCreateDefault/>
       </column>
-      <column name="CREATEDBY" primaryKey="false" required="true" type="DECIMAL" size="10,0" autoIncrement="false">
+      <column name="CREATEDBY" primaryKey="false" required="true" type="VARCHAR" size="32" autoIncrement="false">
         <default/>
         <onCreateDefault/>
       </column>
@@ -33,15 +37,15 @@
         <default><![CDATA[SYSDATE]]></default>
         <onCreateDefault/>
       </column>
-      <column name="UPDATEDBY" primaryKey="false" required="true" type="DECIMAL" size="10,0" autoIncrement="false">
+      <column name="UPDATEDBY" primaryKey="false" required="true" type="VARCHAR" size="32" autoIncrement="false">
         <default/>
         <onCreateDefault/>
       </column>
-      <column name="CH_EXPENSE_ACCT" primaryKey="false" required="false" type="DECIMAL" size="10,0" autoIncrement="false">
+      <column name="CH_EXPENSE_ACCT" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
         <default/>
         <onCreateDefault/>
       </column>
-      <column name="CH_REVENUE_ACCT" primaryKey="false" required="false" type="DECIMAL" size="10,0" autoIncrement="false">
+      <column name="CH_REVENUE_ACCT" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
         <default/>
         <onCreateDefault/>
       </column>
@@ -63,6 +67,10 @@
       <foreign-key foreignTable="C_VALIDCOMBINATION" name="VC_CHREVENUE_CCHARGE">
         <reference local="CH_REVENUE_ACCT" foreign="C_VALIDCOMBINATION_ID"/>
       </foreign-key>
+      <unique name="CCHARGEACCT_CCHARGEID_CACCT_UN">
+        <unique-column name="C_CHARGE_ID"/>
+        <unique-column name="C_ACCTSCHEMA_ID"/>
+      </unique>
       <check name="C_CHARGE_ACCT_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
     </table>
   </database>