Commit 3628b3bf authored by Vincent Pelletier's avatar Vincent Pelletier

Add primary keys on tables:

 category
 inventory_stock
 item
 predicate_category
 stock


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@19525 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent cad972eb
...@@ -267,12 +267,14 @@ WHERE\n ...@@ -267,12 +267,14 @@ WHERE\n
\n \n
<dtml-var "\'\\0\'">\n <dtml-var "\'\\0\'">\n
\n \n
<dtml-let row_list="[]">\n <dtml-let row_list="[]" uid_dict="{}">\n
<dtml-in prefix="loop" expr="_.range(_.len(uid))">\n <dtml-in prefix="loop" expr="_.range(_.len(uid))">\n
<dtml-if expr="isInventoryMovement[loop_item] and isMovement[loop_item] and isAccountable[loop_item] and getResourceUid[loop_item]">\n <dtml-if "isInventoryMovement[loop_item] and isMovement[loop_item] and isAccountable[loop_item] and getResourceUid[loop_item]">\n
<dtml-if "getDestinationUid[loop_item]">\n <dtml-if "getDestinationUid[loop_item]">\n
<dtml-call expr="uid_dict.update({uid[loop_item]: uid_dict.get(uid[loop_item], -1) + 1})">\n
<dtml-call expr="row_list.append([\n <dtml-call expr="row_list.append([\n
uid[loop_item], \n uid[loop_item], \n
uid_dict[uid[loop_item]],\n
getDestinationUid[loop_item],\n getDestinationUid[loop_item],\n
getDestinationSectionUid[loop_item],\n getDestinationSectionUid[loop_item],\n
getDestinationPaymentUid[loop_item],\n getDestinationPaymentUid[loop_item],\n
...@@ -291,8 +293,10 @@ WHERE\n ...@@ -291,8 +293,10 @@ WHERE\n
getSubVariationText[loop_item]])">\n getSubVariationText[loop_item]])">\n
</dtml-if>\n </dtml-if>\n
<dtml-if "getSourceUid[loop_item]">\n <dtml-if "getSourceUid[loop_item]">\n
<dtml-call expr="uid_dict.update({uid[loop_item]: uid_dict.get(uid[loop_item], -1) + 1})">\n
<dtml-call expr="row_list.append([\n <dtml-call expr="row_list.append([\n
uid[loop_item], \n uid[loop_item], \n
uid_dict[uid[loop_item]],\n
getSourceUid[loop_item],\n getSourceUid[loop_item],\n
getSourceSectionUid[loop_item],\n getSourceSectionUid[loop_item],\n
getSourcePaymentUid[loop_item],\n getSourcePaymentUid[loop_item],\n
...@@ -320,22 +324,23 @@ VALUES\n ...@@ -320,22 +324,23 @@ VALUES\n
<dtml-in prefix="row" expr="row_list">\n <dtml-in prefix="row" expr="row_list">\n
(\n (\n
<dtml-sqlvar expr="row_item[0]" type="int">,\n <dtml-sqlvar expr="row_item[0]" type="int">,\n
<dtml-sqlvar expr="row_item[1]" type="int">, \n <dtml-sqlvar expr="row_item[1]" type="int">,\n
<dtml-sqlvar expr="row_item[2]" type="int" optional>, \n <dtml-sqlvar expr="row_item[2]" type="int">,\n
<dtml-sqlvar expr="row_item[3]" type="int" optional>, \n <dtml-sqlvar expr="row_item[3]" type="int" optional>,\n
<dtml-sqlvar expr="row_item[4]" type="int" optional>,\n <dtml-sqlvar expr="row_item[4]" type="int" optional>,\n
<dtml-sqlvar expr="row_item[5]" type="int" optional>,\n <dtml-sqlvar expr="row_item[5]" type="int" optional>,\n
<dtml-sqlvar expr="row_item[6]" type="int" optional>,\n <dtml-sqlvar expr="row_item[6]" type="int" optional>,\n
<dtml-sqlvar expr="row_item[7]" type="int" optional>,\n <dtml-sqlvar expr="row_item[7]" type="int" optional>,\n
<dtml-sqlvar expr="row_item[8]" type="int">, \n <dtml-sqlvar expr="row_item[8]" type="int" optional>,\n
<dtml-sqlvar expr="row_item[9]" type="float" optional>,\n <dtml-sqlvar expr="row_item[9]" type="int">, \n
<dtml-sqlvar expr="row_item[10]" type="datetime" optional>,\n <dtml-sqlvar expr="row_item[10]" type="float" optional>,\n
<dtml-sqlvar expr="row_item[11]" type="datetime" optional>,\n <dtml-sqlvar expr="row_item[11]" type="datetime" optional>,\n
<dtml-sqlvar expr="row_item[12]" type="float" optional>,\n <dtml-sqlvar expr="row_item[12]" type="datetime" optional>,\n
<dtml-sqlvar expr="row_item[13]" type="string" optional>,\n <dtml-sqlvar expr="row_item[13]" type="float" optional>,\n
<dtml-sqlvar expr="row_item[14]" type="string" optional>,\n <dtml-sqlvar expr="row_item[14]" type="string" optional>,\n
<dtml-sqlvar expr="row_item[15]" type="string" optional>,\n <dtml-sqlvar expr="row_item[15]" type="string" optional>,\n
<dtml-sqlvar expr="row_item[16]" type="string" optional>\n <dtml-sqlvar expr="row_item[16]" type="string" optional>,\n
<dtml-sqlvar expr="row_item[17]" type="string" optional>\n
)\n )\n
<dtml-if sequence-end><dtml-else>,</dtml-if>\n <dtml-if sequence-end><dtml-else>,</dtml-if>\n
</dtml-in>\n </dtml-in>\n
...@@ -391,12 +396,14 @@ WHERE\n ...@@ -391,12 +396,14 @@ WHERE\n
\n \n
<dtml-var "\'\\0\'">\n <dtml-var "\'\\0\'">\n
\n \n
<dtml-let row_list="[]">\n <dtml-let row_list="[]" uid_dict="{}">\n
<dtml-in prefix="loop" expr="_.range(_.len(uid))">\n <dtml-in prefix="loop" expr="_.range(_.len(uid))">\n
<dtml-if expr="isInventoryMovement[loop_item] and isMovement[loop_item] and isAccountable[loop_item] and getResourceUid[loop_item]">\n <dtml-if "isInventoryMovement[loop_item] and isMovement[loop_item] and isAccountable[loop_item] and getResourceUid[loop_item]">\n
<dtml-if "getDestinationUid[loop_item]">\n <dtml-if "getDestinationUid[loop_item]">\n
<dtml-call expr="uid_dict.update({uid[loop_item]: uid_dict.get(uid[loop_item], -1) + 1})">\n
<dtml-call expr="row_list.append([\n <dtml-call expr="row_list.append([\n
uid[loop_item], \n uid[loop_item], \n
uid_dict[uid[loop_item]],\n
getDestinationUid[loop_item],\n getDestinationUid[loop_item],\n
getDestinationSectionUid[loop_item],\n getDestinationSectionUid[loop_item],\n
getDestinationPaymentUid[loop_item],\n getDestinationPaymentUid[loop_item],\n
...@@ -415,8 +422,10 @@ WHERE\n ...@@ -415,8 +422,10 @@ WHERE\n
getSubVariationText[loop_item]])">\n getSubVariationText[loop_item]])">\n
</dtml-if>\n </dtml-if>\n
<dtml-if "getSourceUid[loop_item]">\n <dtml-if "getSourceUid[loop_item]">\n
<dtml-call expr="uid_dict.update({uid[loop_item]: uid_dict.get(uid[loop_item], -1) + 1})">\n
<dtml-call expr="row_list.append([\n <dtml-call expr="row_list.append([\n
uid[loop_item], \n uid[loop_item], \n
uid_dict[uid[loop_item]],\n
getSourceUid[loop_item],\n getSourceUid[loop_item],\n
getSourceSectionUid[loop_item],\n getSourceSectionUid[loop_item],\n
getSourcePaymentUid[loop_item],\n getSourcePaymentUid[loop_item],\n
...@@ -444,22 +453,23 @@ VALUES\n ...@@ -444,22 +453,23 @@ VALUES\n
<dtml-in prefix="row" expr="row_list">\n <dtml-in prefix="row" expr="row_list">\n
(\n (\n
<dtml-sqlvar expr="row_item[0]" type="int">,\n <dtml-sqlvar expr="row_item[0]" type="int">,\n
<dtml-sqlvar expr="row_item[1]" type="int">, \n <dtml-sqlvar expr="row_item[1]" type="int">,\n
<dtml-sqlvar expr="row_item[2]" type="int" optional>, \n <dtml-sqlvar expr="row_item[2]" type="int">,\n
<dtml-sqlvar expr="row_item[3]" type="int" optional>, \n <dtml-sqlvar expr="row_item[3]" type="int" optional>,\n
<dtml-sqlvar expr="row_item[4]" type="int" optional>,\n <dtml-sqlvar expr="row_item[4]" type="int" optional>,\n
<dtml-sqlvar expr="row_item[5]" type="int" optional>,\n <dtml-sqlvar expr="row_item[5]" type="int" optional>,\n
<dtml-sqlvar expr="row_item[6]" type="int" optional>,\n <dtml-sqlvar expr="row_item[6]" type="int" optional>,\n
<dtml-sqlvar expr="row_item[7]" type="int" optional>,\n <dtml-sqlvar expr="row_item[7]" type="int" optional>,\n
<dtml-sqlvar expr="row_item[8]" type="int">, \n <dtml-sqlvar expr="row_item[8]" type="int" optional>,\n
<dtml-sqlvar expr="row_item[9]" type="float" optional>,\n <dtml-sqlvar expr="row_item[9]" type="int">, \n
<dtml-sqlvar expr="row_item[10]" type="datetime" optional>,\n <dtml-sqlvar expr="row_item[10]" type="float" optional>,\n
<dtml-sqlvar expr="row_item[11]" type="datetime" optional>,\n <dtml-sqlvar expr="row_item[11]" type="datetime" optional>,\n
<dtml-sqlvar expr="row_item[12]" type="float" optional>,\n <dtml-sqlvar expr="row_item[12]" type="datetime" optional>,\n
<dtml-sqlvar expr="row_item[13]" type="string" optional>,\n <dtml-sqlvar expr="row_item[13]" type="float" optional>,\n
<dtml-sqlvar expr="row_item[14]" type="string" optional>,\n <dtml-sqlvar expr="row_item[14]" type="string" optional>,\n
<dtml-sqlvar expr="row_item[15]" type="string" optional>,\n <dtml-sqlvar expr="row_item[15]" type="string" optional>,\n
<dtml-sqlvar expr="row_item[16]" type="string" optional>\n <dtml-sqlvar expr="row_item[16]" type="string" optional>,\n
<dtml-sqlvar expr="row_item[17]" type="string" optional>\n
)\n )\n
<dtml-if sequence-end><dtml-else>,</dtml-if>\n <dtml-if sequence-end><dtml-else>,</dtml-if>\n
</dtml-in>\n </dtml-in>\n
......
...@@ -38,12 +38,6 @@ ...@@ -38,12 +38,6 @@
<dictionary/> <dictionary/>
</value> </value>
</item> </item>
<item>
<key> <string>isMovement</string> </key>
<value>
<dictionary/>
</value>
</item>
<item> <item>
<key> <string>uid</string> </key> <key> <string>uid</string> </key>
<value> <value>
...@@ -57,9 +51,8 @@ ...@@ -57,9 +51,8 @@
<key> <string>_keys</string> </key> <key> <string>_keys</string> </key>
<value> <value>
<list> <list>
<string>uid</string> <string>uid</string>
<string>isMovement</string> <string>getCategoryList</string>
<string>getCategoryList</string>
</list> </list>
</value> </value>
</item> </item>
...@@ -77,7 +70,6 @@ ...@@ -77,7 +70,6 @@
<item> <item>
<key> <string>arguments_src</string> </key> <key> <string>arguments_src</string> </key>
<value> <string>uid\r\n <value> <string>uid\r\n
isMovement\r\n
getCategoryList</string> </value> getCategoryList</string> </value>
</item> </item>
<item> <item>
...@@ -125,43 +117,22 @@ WHERE\n ...@@ -125,43 +117,22 @@ WHERE\n
uid=<dtml-sqlvar sequence-item type="int"><dtml-if sequence-end><dtml-else> OR </dtml-if>\n uid=<dtml-sqlvar sequence-item type="int"><dtml-if sequence-end><dtml-else> OR </dtml-if>\n
</dtml-in>\n </dtml-in>\n
;\n ;\n
\n
<dtml-var "\'\\0\'">\n <dtml-var "\'\\0\'">\n
\n <dtml-let category_list="[]">\n
INSERT INTO category VALUES\n
<dtml-in prefix="loop" expr="_.range(_.len(uid))">\n <dtml-in prefix="loop" expr="_.range(_.len(uid))">\n
<dtml-if sequence-start><dtml-else>,</dtml-if>\n <dtml-if expr="getCategoryList[loop_item]">\n
<dtml-if expr="getCategoryList[loop_item]">\n <dtml-let uid_list="portal_categories.getCategoryParentUidList(getCategoryList[loop_item])">\n
<dtml-let uid_list="portal_categories.getCategoryParentUidList(getCategoryList[loop_item])">\n <dtml-if uid_list>\n
<dtml-if uid_list>\n <dtml-in prefix="uid" expr="uid_list">\n
<dtml-in prefix="uid" expr="uid_list">\n <dtml-call expr="category_list.append((uid[loop_item], uid_item[0], uid_item[1], uid_item[2]))">\n
<dtml-if sequence-start><dtml-else>,</dtml-if>\n </dtml-in></dtml-if></dtml-let></dtml-if></dtml-in>\n
(\n <dtml-if expr="category_list">\n
<dtml-sqlvar expr="uid[loop_item]" type="int">,\n INSERT INTO category VALUES\n
<dtml-sqlvar expr="uid_item[0]" type="int">,\n <dtml-in prefix="loop" expr="category_list">\n
<dtml-sqlvar expr="uid_item[1]" type="int">,\n (<dtml-sqlvar expr="loop_item[0]" type="int">, <dtml-sqlvar expr="loop_item[1]" type="int">, <dtml-sqlvar expr="loop_item[2]" type="int">, <dtml-sqlvar expr="loop_item[3]" type="int">)<dtml-if sequence-end><dtml-else>,</dtml-if>\n
<dtml-sqlvar expr="uid_item[2]" type="int">\n </dtml-in>\n
)\n </dtml-if>\n
</dtml-in> \n </dtml-let>
<dtml-else>\n
(\n
<dtml-sqlvar expr="uid[loop_item]" type="int">,\n
NULL,\n
NULL,\n
1\n
)\n
</dtml-if>\n
</dtml-let>\n
<dtml-else>\n
(\n
<dtml-sqlvar expr="uid[loop_item]" type="int">,\n
NULL,\n
NULL,\n
1\n
)\n
</dtml-if>\n
</dtml-in> \n
]]></string> </value> ]]></string> </value>
</item> </item>
...@@ -170,9 +141,11 @@ INSERT INTO category VALUES\n ...@@ -170,9 +141,11 @@ INSERT INTO category VALUES\n
<value> <value>
<object> <object>
<klass> <klass>
<global name="SQL" module="Shared.DC.ZRDB.DA"/> <global name="__newobj__" module="copy_reg"/>
</klass> </klass>
<none/> <tuple>
<global name="SQL" module="Shared.DC.ZRDB.DA"/>
</tuple>
<state> <state>
<dictionary> <dictionary>
<item> <item>
...@@ -206,43 +179,22 @@ WHERE\n ...@@ -206,43 +179,22 @@ WHERE\n
uid=<dtml-sqlvar sequence-item type="int"><dtml-if sequence-end><dtml-else> OR </dtml-if>\n uid=<dtml-sqlvar sequence-item type="int"><dtml-if sequence-end><dtml-else> OR </dtml-if>\n
</dtml-in>\n </dtml-in>\n
;\n ;\n
\n
<dtml-var "\'\\0\'">\n <dtml-var "\'\\0\'">\n
\n <dtml-let category_list="[]">\n
INSERT INTO category VALUES\n
<dtml-in prefix="loop" expr="_.range(_.len(uid))">\n <dtml-in prefix="loop" expr="_.range(_.len(uid))">\n
<dtml-if sequence-start><dtml-else>,</dtml-if>\n <dtml-if expr="getCategoryList[loop_item]">\n
<dtml-if expr="getCategoryList[loop_item]">\n <dtml-let uid_list="portal_categories.getCategoryParentUidList(getCategoryList[loop_item])">\n
<dtml-let uid_list="portal_categories.getCategoryParentUidList(getCategoryList[loop_item])">\n <dtml-if uid_list>\n
<dtml-if uid_list>\n <dtml-in prefix="uid" expr="uid_list">\n
<dtml-in prefix="uid" expr="uid_list">\n <dtml-call expr="category_list.append((uid[loop_item], uid_item[0], uid_item[1], uid_item[2]))">\n
<dtml-if sequence-start><dtml-else>,</dtml-if>\n </dtml-in></dtml-if></dtml-let></dtml-if></dtml-in>\n
(\n <dtml-if expr="category_list">\n
<dtml-sqlvar expr="uid[loop_item]" type="int">,\n INSERT INTO category VALUES\n
<dtml-sqlvar expr="uid_item[0]" type="int">,\n <dtml-in prefix="loop" expr="category_list">\n
<dtml-sqlvar expr="uid_item[1]" type="int">,\n (<dtml-sqlvar expr="loop_item[0]" type="int">, <dtml-sqlvar expr="loop_item[1]" type="int">, <dtml-sqlvar expr="loop_item[2]" type="int">, <dtml-sqlvar expr="loop_item[3]" type="int">)<dtml-if sequence-end><dtml-else>,</dtml-if>\n
<dtml-sqlvar expr="uid_item[2]" type="int">\n </dtml-in>\n
)\n </dtml-if>\n
</dtml-in> \n </dtml-let>
<dtml-else>\n
(\n
<dtml-sqlvar expr="uid[loop_item]" type="int">,\n
NULL,\n
NULL,\n
1\n
)\n
</dtml-if>\n
</dtml-let>\n
<dtml-else>\n
(\n
<dtml-sqlvar expr="uid[loop_item]" type="int">,\n
NULL,\n
NULL,\n
1\n
)\n
</dtml-if>\n
</dtml-in> \n
]]></string> </value> ]]></string> </value>
</item> </item>
......
...@@ -117,43 +117,22 @@ WHERE\n ...@@ -117,43 +117,22 @@ WHERE\n
uid=<dtml-sqlvar sequence-item type="int"><dtml-if sequence-end><dtml-else> OR </dtml-if>\n uid=<dtml-sqlvar sequence-item type="int"><dtml-if sequence-end><dtml-else> OR </dtml-if>\n
</dtml-in>\n </dtml-in>\n
;\n ;\n
\n
<dtml-var "\'\\0\'">\n <dtml-var "\'\\0\'">\n
\n <dtml-let category_list="[]">\n
INSERT INTO category VALUES\n
<dtml-in prefix="loop" expr="_.range(_.len(uid))">\n <dtml-in prefix="loop" expr="_.range(_.len(uid))">\n
<dtml-if sequence-start><dtml-else>,</dtml-if>\n <dtml-if expr="getAcquiredCategoryList[loop_item]">\n
<dtml-if expr="getAcquiredCategoryList[loop_item]">\n <dtml-let uid_list="portal_categories.getCategoryParentUidList(getAcquiredCategoryList[loop_item])">\n
<dtml-let uid_list="portal_categories.getCategoryParentUidList(getAcquiredCategoryList[loop_item])">\n <dtml-if uid_list>\n
<dtml-if uid_list>\n <dtml-in prefix="uid" expr="uid_list">\n
<dtml-in prefix="uid" expr="uid_list">\n <dtml-call expr="category_list.append((uid[loop_item], uid_item[0], uid_item[1], uid_item[2]))">\n
<dtml-if sequence-start><dtml-else>,</dtml-if>\n </dtml-in></dtml-if></dtml-let></dtml-if></dtml-in> \n
(\n <dtml-if expr="category_list">\n
<dtml-sqlvar expr="uid[loop_item]" type="int">,\n INSERT INTO category VALUES\n
<dtml-sqlvar expr="uid_item[0]" type="int">,\n <dtml-in prefix="loop" expr="category_list">\n
<dtml-sqlvar expr="uid_item[1]" type="int">,\n (<dtml-sqlvar expr="loop_item[0]" type="int">, <dtml-sqlvar expr="loop_item[1]" type="int">, <dtml-sqlvar expr="loop_item[2]" type="int">, <dtml-sqlvar expr="loop_item[3]" type="int">)<dtml-if sequence-end><dtml-else>,</dtml-if>\n
<dtml-sqlvar expr="uid_item[2]" type="int">\n </dtml-in>\n
)\n </dtml-if>\n
</dtml-in> \n </dtml-let>
<dtml-else>\n
(\n
<dtml-sqlvar expr="uid[loop_item]" type="int">,\n
NULL,\n
NULL,\n
1\n
)\n
</dtml-if>\n
</dtml-let>\n
<dtml-else>\n
(\n
<dtml-sqlvar expr="uid[loop_item]" type="int">,\n
NULL,\n
NULL,\n
1\n
)\n
</dtml-if>\n
</dtml-in> \n
]]></string> </value> ]]></string> </value>
</item> </item>
...@@ -198,43 +177,22 @@ WHERE\n ...@@ -198,43 +177,22 @@ WHERE\n
uid=<dtml-sqlvar sequence-item type="int"><dtml-if sequence-end><dtml-else> OR </dtml-if>\n uid=<dtml-sqlvar sequence-item type="int"><dtml-if sequence-end><dtml-else> OR </dtml-if>\n
</dtml-in>\n </dtml-in>\n
;\n ;\n
\n
<dtml-var "\'\\0\'">\n <dtml-var "\'\\0\'">\n
\n <dtml-let category_list="[]">\n
INSERT INTO category VALUES\n
<dtml-in prefix="loop" expr="_.range(_.len(uid))">\n <dtml-in prefix="loop" expr="_.range(_.len(uid))">\n
<dtml-if sequence-start><dtml-else>,</dtml-if>\n <dtml-if expr="getAcquiredCategoryList[loop_item]">\n
<dtml-if expr="getAcquiredCategoryList[loop_item]">\n <dtml-let uid_list="portal_categories.getCategoryParentUidList(getAcquiredCategoryList[loop_item])">\n
<dtml-let uid_list="portal_categories.getCategoryParentUidList(getAcquiredCategoryList[loop_item])">\n <dtml-if uid_list>\n
<dtml-if uid_list>\n <dtml-in prefix="uid" expr="uid_list">\n
<dtml-in prefix="uid" expr="uid_list">\n <dtml-call expr="category_list.append((uid[loop_item], uid_item[0], uid_item[1], uid_item[2]))">\n
<dtml-if sequence-start><dtml-else>,</dtml-if>\n </dtml-in></dtml-if></dtml-let></dtml-if></dtml-in> \n
(\n <dtml-if expr="category_list">\n
<dtml-sqlvar expr="uid[loop_item]" type="int">,\n INSERT INTO category VALUES\n
<dtml-sqlvar expr="uid_item[0]" type="int">,\n <dtml-in prefix="loop" expr="category_list">\n
<dtml-sqlvar expr="uid_item[1]" type="int">,\n (<dtml-sqlvar expr="loop_item[0]" type="int">, <dtml-sqlvar expr="loop_item[1]" type="int">, <dtml-sqlvar expr="loop_item[2]" type="int">, <dtml-sqlvar expr="loop_item[3]" type="int">)<dtml-if sequence-end><dtml-else>,</dtml-if>\n
<dtml-sqlvar expr="uid_item[2]" type="int">\n </dtml-in>\n
)\n </dtml-if>\n
</dtml-in> \n </dtml-let>
<dtml-else>\n
(\n
<dtml-sqlvar expr="uid[loop_item]" type="int">,\n
NULL,\n
NULL,\n
1\n
)\n
</dtml-if>\n
</dtml-let>\n
<dtml-else>\n
(\n
<dtml-sqlvar expr="uid[loop_item]" type="int">,\n
NULL,\n
NULL,\n
1\n
)\n
</dtml-if>\n
</dtml-in> \n
]]></string> </value> ]]></string> </value>
</item> </item>
......
...@@ -125,37 +125,22 @@ WHERE\n ...@@ -125,37 +125,22 @@ WHERE\n
uid=<dtml-sqlvar sequence-item type="int"><dtml-if sequence-end><dtml-else> OR </dtml-if>\n uid=<dtml-sqlvar sequence-item type="int"><dtml-if sequence-end><dtml-else> OR </dtml-if>\n
</dtml-in>\n </dtml-in>\n
;\n ;\n
\n
<dtml-var "\'\\0\'">\n <dtml-var "\'\\0\'">\n
\n <dtml-let category_list="[]">\n
<dtml-let predicate_list="[]">\n <dtml-in prefix="loop" expr="_.range(_.len(uid))">\n
<dtml-in prefix="loop" expr="_.range(_.len(uid))">\n <dtml-if expr="isPredicate[loop_item] and predicate_property_dict[loop_item].has_key(\'membership_criterion_category_list\')">\n
<dtml-if "isPredicate[loop_item]">\n <dtml-let uid_list="portal_categories.getCategoryParentUidList(predicate_property_dict[loop_item][\'membership_criterion_category_list\'])">\n
<dtml-call expr="predicate_list.append(loop_item)">\n <dtml-if uid_list>\n
</dtml-if>\n <dtml-in prefix="uid" expr="uid_list">\n
</dtml-in>\n <dtml-call expr="category_list.append((uid[loop_item], uid_item[0], uid_item[1], uid_item[2]))">\n
<dtml-if expr="_.len(predicate_list) > 0">\n </dtml-in></dtml-if></dtml-let></dtml-if></dtml-in>\n
<dtml-if expr="category_list">\n
INSERT INTO predicate_category VALUES \n INSERT INTO predicate_category VALUES \n
<dtml-in prefix="loop" expr="predicate_list">\n <dtml-in prefix="loop" expr="category_list">\n
<dtml-if sequence-start><dtml-else>,</dtml-if>\n <dtml-if sequence-start><dtml-else>,</dtml-if>(<dtml-sqlvar expr="loop_item[0]" type="int">, <dtml-sqlvar expr="loop_item[1]" type="int">, <dtml-sqlvar expr="loop_item[2]" type="int">, <dtml-sqlvar expr="loop_item[3]" type="int">)\n
<dtml-if "predicate_property_dict[loop_item].has_key(\'membership_criterion_category_list\')">\n </dtml-in>\n
<dtml-let uid_list="portal_categories.getCategoryParentUidList(predicate_property_dict[loop_item][\'membership_criterion_category_list\'])">\n </dtml-if>\n
<dtml-if uid_list>\n </dtml-let>
<dtml-in "uid_list">\n
(<dtml-sqlvar expr="uid[loop_item]" type="int">, <dtml-var "_[\'sequence-item\'][0]" >, <dtml-var "_[\'sequence-item\'][1]" >, <dtml-var "_[\'sequence-item\'][2]" >)\n
<dtml-if sequence-end><dtml-else>,</dtml-if>\n
</dtml-in> \n
<dtml-else>\n
(<dtml-sqlvar expr="uid[loop_item]" type="int">, NULL, NULL,1)\n
</dtml-if>\n
</dtml-let>\n
<dtml-else>\n
(<dtml-sqlvar expr="uid[loop_item]" type="int">, NULL, NULL,1)\n
</dtml-if>\n
</dtml-in>\n
</dtml-if>\n
</dtml-let>\n
]]></string> </value> ]]></string> </value>
</item> </item>
...@@ -200,37 +185,22 @@ WHERE\n ...@@ -200,37 +185,22 @@ WHERE\n
uid=<dtml-sqlvar sequence-item type="int"><dtml-if sequence-end><dtml-else> OR </dtml-if>\n uid=<dtml-sqlvar sequence-item type="int"><dtml-if sequence-end><dtml-else> OR </dtml-if>\n
</dtml-in>\n </dtml-in>\n
;\n ;\n
\n
<dtml-var "\'\\0\'">\n <dtml-var "\'\\0\'">\n
\n <dtml-let category_list="[]">\n
<dtml-let predicate_list="[]">\n <dtml-in prefix="loop" expr="_.range(_.len(uid))">\n
<dtml-in prefix="loop" expr="_.range(_.len(uid))">\n <dtml-if expr="isPredicate[loop_item] and predicate_property_dict[loop_item].has_key(\'membership_criterion_category_list\')">\n
<dtml-if "isPredicate[loop_item]">\n <dtml-let uid_list="portal_categories.getCategoryParentUidList(predicate_property_dict[loop_item][\'membership_criterion_category_list\'])">\n
<dtml-call expr="predicate_list.append(loop_item)">\n <dtml-if uid_list>\n
</dtml-if>\n <dtml-in prefix="uid" expr="uid_list">\n
</dtml-in>\n <dtml-call expr="category_list.append((uid[loop_item], uid_item[0], uid_item[1], uid_item[2]))">\n
<dtml-if expr="_.len(predicate_list) > 0">\n </dtml-in></dtml-if></dtml-let></dtml-if></dtml-in>\n
<dtml-if expr="category_list">\n
INSERT INTO predicate_category VALUES \n INSERT INTO predicate_category VALUES \n
<dtml-in prefix="loop" expr="predicate_list">\n <dtml-in prefix="loop" expr="category_list">\n
<dtml-if sequence-start><dtml-else>,</dtml-if>\n <dtml-if sequence-start><dtml-else>,</dtml-if>(<dtml-sqlvar expr="loop_item[0]" type="int">, <dtml-sqlvar expr="loop_item[1]" type="int">, <dtml-sqlvar expr="loop_item[2]" type="int">, <dtml-sqlvar expr="loop_item[3]" type="int">)\n
<dtml-if "predicate_property_dict[loop_item].has_key(\'membership_criterion_category_list\')">\n </dtml-in>\n
<dtml-let uid_list="portal_categories.getCategoryParentUidList(predicate_property_dict[loop_item][\'membership_criterion_category_list\'])">\n </dtml-if>\n
<dtml-if uid_list>\n </dtml-let>
<dtml-in "uid_list">\n
(<dtml-sqlvar expr="uid[loop_item]" type="int">, <dtml-var "_[\'sequence-item\'][0]" >, <dtml-var "_[\'sequence-item\'][1]" >, <dtml-var "_[\'sequence-item\'][2]" >)\n
<dtml-if sequence-end><dtml-else>,</dtml-if>\n
</dtml-in> \n
<dtml-else>\n
(<dtml-sqlvar expr="uid[loop_item]" type="int">, NULL, NULL,1)\n
</dtml-if>\n
</dtml-let>\n
<dtml-else>\n
(<dtml-sqlvar expr="uid[loop_item]" type="int">, NULL, NULL,1)\n
</dtml-if>\n
</dtml-in>\n
</dtml-if>\n
</dtml-let>\n
]]></string> </value> ]]></string> </value>
</item> </item>
......
...@@ -293,15 +293,14 @@ WHERE\n ...@@ -293,15 +293,14 @@ WHERE\n
\n \n
<dtml-var "\'\\0\'">\n <dtml-var "\'\\0\'">\n
\n \n
<dtml-let row_list="[]">\n <dtml-let row_list="[]" uid_dict="{}">\n
<dtml-in prefix="loop" expr="_.range(_.len(uid))">\n <dtml-in prefix="loop" expr="_.range(_.len(uid))">\n
<dtml-if "isMovement[loop_item]">\n <dtml-if "not(isInventoryMovement[loop_item]) and isMovement[loop_item] and isAccountable[loop_item] and getResourceUid[loop_item]">\n
<dtml-if "not isInventoryMovement[loop_item]">\n
<dtml-if "isAccountable[loop_item]">\n
<dtml-if "getResourceUid[loop_item]">\n
<dtml-if "getDestinationUid[loop_item]">\n <dtml-if "getDestinationUid[loop_item]">\n
<dtml-call expr="uid_dict.update({uid[loop_item]: uid_dict.get(uid[loop_item], -1) + 1})">\n
<dtml-call expr="row_list.append([\n <dtml-call expr="row_list.append([\n
uid[loop_item], \n uid[loop_item], \n
uid_dict[uid[loop_item]],\n
getDestinationUid[loop_item],\n getDestinationUid[loop_item],\n
getDestinationSectionUid[loop_item],\n getDestinationSectionUid[loop_item],\n
getDestinationPaymentUid[loop_item],\n getDestinationPaymentUid[loop_item],\n
...@@ -320,8 +319,10 @@ WHERE\n ...@@ -320,8 +319,10 @@ WHERE\n
getSubVariationText[loop_item]])">\n getSubVariationText[loop_item]])">\n
</dtml-if>\n </dtml-if>\n
<dtml-if "getSourceUid[loop_item]">\n <dtml-if "getSourceUid[loop_item]">\n
<dtml-call expr="uid_dict.update({uid[loop_item]: uid_dict.get(uid[loop_item], -1) + 1})">\n
<dtml-call expr="row_list.append([\n <dtml-call expr="row_list.append([\n
uid[loop_item], \n uid[loop_item], \n
uid_dict[uid[loop_item]],\n
getSourceUid[loop_item],\n getSourceUid[loop_item],\n
getSourceSectionUid[loop_item],\n getSourceSectionUid[loop_item],\n
getSourcePaymentUid[loop_item],\n getSourcePaymentUid[loop_item],\n
...@@ -340,9 +341,6 @@ WHERE\n ...@@ -340,9 +341,6 @@ WHERE\n
getSubVariationText[loop_item]])">\n getSubVariationText[loop_item]])">\n
</dtml-if>\n </dtml-if>\n
</dtml-if>\n </dtml-if>\n
</dtml-if>\n
</dtml-if>\n
</dtml-if>\n
</dtml-in> \n </dtml-in> \n
\n \n
<dtml-if "row_list">\n <dtml-if "row_list">\n
...@@ -352,22 +350,23 @@ VALUES\n ...@@ -352,22 +350,23 @@ VALUES\n
<dtml-in prefix="row" expr="row_list">\n <dtml-in prefix="row" expr="row_list">\n
(\n (\n
<dtml-sqlvar expr="row_item[0]" type="int">,\n <dtml-sqlvar expr="row_item[0]" type="int">,\n
<dtml-sqlvar expr="row_item[1]" type="int">, \n <dtml-sqlvar expr="row_item[1]" type="int">,\n
<dtml-sqlvar expr="row_item[2]" type="int" optional>, \n <dtml-sqlvar expr="row_item[2]" type="int">, \n
<dtml-sqlvar expr="row_item[3]" type="int" optional>, \n <dtml-sqlvar expr="row_item[3]" type="int" optional>, \n
<dtml-sqlvar expr="row_item[4]" type="int" optional>,\n <dtml-sqlvar expr="row_item[4]" type="int" optional>, \n
<dtml-sqlvar expr="row_item[5]" type="int" optional>,\n <dtml-sqlvar expr="row_item[5]" type="int" optional>,\n
<dtml-sqlvar expr="row_item[6]" type="int" optional>,\n <dtml-sqlvar expr="row_item[6]" type="int" optional>,\n
<dtml-sqlvar expr="row_item[7]" type="int" optional>,\n <dtml-sqlvar expr="row_item[7]" type="int" optional>,\n
<dtml-sqlvar expr="row_item[8]" type="int">, \n <dtml-sqlvar expr="row_item[8]" type="int" optional>,\n
<dtml-sqlvar expr="row_item[9]" type="float" optional>,\n <dtml-sqlvar expr="row_item[9]" type="int">, \n
<dtml-sqlvar expr="row_item[10]" type="datetime" optional>,\n <dtml-sqlvar expr="row_item[10]" type="float" optional>,\n
<dtml-sqlvar expr="row_item[11]" type="datetime" optional>,\n <dtml-sqlvar expr="row_item[11]" type="datetime" optional>,\n
<dtml-sqlvar expr="row_item[12]" type="float" optional>,\n <dtml-sqlvar expr="row_item[12]" type="datetime" optional>,\n
<dtml-sqlvar expr="row_item[13]" type="string" optional>,\n <dtml-sqlvar expr="row_item[13]" type="float" optional>,\n
<dtml-sqlvar expr="row_item[14]" type="string" optional>,\n <dtml-sqlvar expr="row_item[14]" type="string" optional>,\n
<dtml-sqlvar expr="row_item[15]" type="string" optional>,\n <dtml-sqlvar expr="row_item[15]" type="string" optional>,\n
<dtml-sqlvar expr="row_item[16]" type="string" optional>\n <dtml-sqlvar expr="row_item[16]" type="string" optional>,\n
<dtml-sqlvar expr="row_item[17]" type="string" optional>\n
)\n )\n
<dtml-if sequence-end><dtml-else>,</dtml-if>\n <dtml-if sequence-end><dtml-else>,</dtml-if>\n
</dtml-in>\n </dtml-in>\n
...@@ -423,15 +422,14 @@ WHERE\n ...@@ -423,15 +422,14 @@ WHERE\n
\n \n
<dtml-var "\'\\0\'">\n <dtml-var "\'\\0\'">\n
\n \n
<dtml-let row_list="[]">\n <dtml-let row_list="[]" uid_dict="{}">\n
<dtml-in prefix="loop" expr="_.range(_.len(uid))">\n <dtml-in prefix="loop" expr="_.range(_.len(uid))">\n
<dtml-if "isMovement[loop_item]">\n <dtml-if "not(isInventoryMovement[loop_item]) and isMovement[loop_item] and isAccountable[loop_item] and getResourceUid[loop_item]">\n
<dtml-if "not isInventoryMovement[loop_item]">\n
<dtml-if "isAccountable[loop_item]">\n
<dtml-if "getResourceUid[loop_item]">\n
<dtml-if "getDestinationUid[loop_item]">\n <dtml-if "getDestinationUid[loop_item]">\n
<dtml-call expr="uid_dict.update({uid[loop_item]: uid_dict.get(uid[loop_item], -1) + 1})">\n
<dtml-call expr="row_list.append([\n <dtml-call expr="row_list.append([\n
uid[loop_item], \n uid[loop_item], \n
uid_dict[uid[loop_item]],\n
getDestinationUid[loop_item],\n getDestinationUid[loop_item],\n
getDestinationSectionUid[loop_item],\n getDestinationSectionUid[loop_item],\n
getDestinationPaymentUid[loop_item],\n getDestinationPaymentUid[loop_item],\n
...@@ -450,8 +448,10 @@ WHERE\n ...@@ -450,8 +448,10 @@ WHERE\n
getSubVariationText[loop_item]])">\n getSubVariationText[loop_item]])">\n
</dtml-if>\n </dtml-if>\n
<dtml-if "getSourceUid[loop_item]">\n <dtml-if "getSourceUid[loop_item]">\n
<dtml-call expr="uid_dict.update({uid[loop_item]: uid_dict.get(uid[loop_item], -1) + 1})">\n
<dtml-call expr="row_list.append([\n <dtml-call expr="row_list.append([\n
uid[loop_item], \n uid[loop_item], \n
uid_dict[uid[loop_item]],\n
getSourceUid[loop_item],\n getSourceUid[loop_item],\n
getSourceSectionUid[loop_item],\n getSourceSectionUid[loop_item],\n
getSourcePaymentUid[loop_item],\n getSourcePaymentUid[loop_item],\n
...@@ -470,9 +470,6 @@ WHERE\n ...@@ -470,9 +470,6 @@ WHERE\n
getSubVariationText[loop_item]])">\n getSubVariationText[loop_item]])">\n
</dtml-if>\n </dtml-if>\n
</dtml-if>\n </dtml-if>\n
</dtml-if>\n
</dtml-if>\n
</dtml-if>\n
</dtml-in> \n </dtml-in> \n
\n \n
<dtml-if "row_list">\n <dtml-if "row_list">\n
...@@ -482,22 +479,23 @@ VALUES\n ...@@ -482,22 +479,23 @@ VALUES\n
<dtml-in prefix="row" expr="row_list">\n <dtml-in prefix="row" expr="row_list">\n
(\n (\n
<dtml-sqlvar expr="row_item[0]" type="int">,\n <dtml-sqlvar expr="row_item[0]" type="int">,\n
<dtml-sqlvar expr="row_item[1]" type="int">, \n <dtml-sqlvar expr="row_item[1]" type="int">,\n
<dtml-sqlvar expr="row_item[2]" type="int" optional>, \n <dtml-sqlvar expr="row_item[2]" type="int">, \n
<dtml-sqlvar expr="row_item[3]" type="int" optional>, \n <dtml-sqlvar expr="row_item[3]" type="int" optional>, \n
<dtml-sqlvar expr="row_item[4]" type="int" optional>,\n <dtml-sqlvar expr="row_item[4]" type="int" optional>, \n
<dtml-sqlvar expr="row_item[5]" type="int" optional>,\n <dtml-sqlvar expr="row_item[5]" type="int" optional>,\n
<dtml-sqlvar expr="row_item[6]" type="int" optional>,\n <dtml-sqlvar expr="row_item[6]" type="int" optional>,\n
<dtml-sqlvar expr="row_item[7]" type="int" optional>,\n <dtml-sqlvar expr="row_item[7]" type="int" optional>,\n
<dtml-sqlvar expr="row_item[8]" type="int">, \n <dtml-sqlvar expr="row_item[8]" type="int" optional>,\n
<dtml-sqlvar expr="row_item[9]" type="float" optional>,\n <dtml-sqlvar expr="row_item[9]" type="int">, \n
<dtml-sqlvar expr="row_item[10]" type="datetime" optional>,\n <dtml-sqlvar expr="row_item[10]" type="float" optional>,\n
<dtml-sqlvar expr="row_item[11]" type="datetime" optional>,\n <dtml-sqlvar expr="row_item[11]" type="datetime" optional>,\n
<dtml-sqlvar expr="row_item[12]" type="float" optional>,\n <dtml-sqlvar expr="row_item[12]" type="datetime" optional>,\n
<dtml-sqlvar expr="row_item[13]" type="string" optional>,\n <dtml-sqlvar expr="row_item[13]" type="float" optional>,\n
<dtml-sqlvar expr="row_item[14]" type="string" optional>,\n <dtml-sqlvar expr="row_item[14]" type="string" optional>,\n
<dtml-sqlvar expr="row_item[15]" type="string" optional>,\n <dtml-sqlvar expr="row_item[15]" type="string" optional>,\n
<dtml-sqlvar expr="row_item[16]" type="string" optional>\n <dtml-sqlvar expr="row_item[16]" type="string" optional>,\n
<dtml-sqlvar expr="row_item[17]" type="string" optional>\n
)\n )\n
<dtml-if sequence-end><dtml-else>,</dtml-if>\n <dtml-if sequence-end><dtml-else>,</dtml-if>\n
</dtml-in>\n </dtml-in>\n
......
...@@ -100,7 +100,7 @@ CREATE TABLE `category` (\n ...@@ -100,7 +100,7 @@ CREATE TABLE `category` (\n
`category_uid` BIGINT UNSIGNED default \'0\',\n `category_uid` BIGINT UNSIGNED default \'0\',\n
`base_category_uid` BIGINT UNSIGNED default \'0\',\n `base_category_uid` BIGINT UNSIGNED default \'0\',\n
`category_strict_membership` tinyint(1) default \'0\',\n `category_strict_membership` tinyint(1) default \'0\',\n
KEY `uid` (`uid`),\n PRIMARY KEY (`uid`, `category_uid`, `base_category_uid`, `category_strict_membership`),\n
KEY `Membership` (`category_uid`,`base_category_uid`)\n KEY `Membership` (`category_uid`,`base_category_uid`)\n
) TYPE = InnoDB;</string> </value> ) TYPE = InnoDB;</string> </value>
</item> </item>
...@@ -145,7 +145,7 @@ CREATE TABLE `category` (\n ...@@ -145,7 +145,7 @@ CREATE TABLE `category` (\n
`category_uid` BIGINT UNSIGNED default \'0\',\n `category_uid` BIGINT UNSIGNED default \'0\',\n
`base_category_uid` BIGINT UNSIGNED default \'0\',\n `base_category_uid` BIGINT UNSIGNED default \'0\',\n
`category_strict_membership` tinyint(1) default \'0\',\n `category_strict_membership` tinyint(1) default \'0\',\n
KEY `uid` (`uid`),\n PRIMARY KEY (`uid`, `category_uid`, `base_category_uid`, `category_strict_membership`),\n
KEY `Membership` (`category_uid`,`base_category_uid`)\n KEY `Membership` (`category_uid`,`base_category_uid`)\n
) TYPE = InnoDB;</string> </value> ) TYPE = InnoDB;</string> </value>
</item> </item>
......
...@@ -64,6 +64,7 @@ ...@@ -64,6 +64,7 @@
<key> <string>src</string> </key> <key> <string>src</string> </key>
<value> <string>CREATE TABLE `inventory_stock` (\n <value> <string>CREATE TABLE `inventory_stock` (\n
`uid` BIGINT UNSIGNED NOT NULL,\n `uid` BIGINT UNSIGNED NOT NULL,\n
`order_id` TINYINT UNSIGNED NOT NULL,\n
`node_uid` BIGINT UNSIGNED,\n `node_uid` BIGINT UNSIGNED,\n
`section_uid` BIGINT UNSIGNED,\n `section_uid` BIGINT UNSIGNED,\n
`payment_uid` BIGINT UNSIGNED,\n `payment_uid` BIGINT UNSIGNED,\n
...@@ -80,7 +81,7 @@ ...@@ -80,7 +81,7 @@
`simulation_state` varchar(255) default \'\',\n `simulation_state` varchar(255) default \'\',\n
`variation_text` VARCHAR(255),\n `variation_text` VARCHAR(255),\n
`sub_variation_text` VARCHAR(255),\n `sub_variation_text` VARCHAR(255),\n
KEY `uid` (`uid`),\n PRIMARY KEY (`uid`, `order_id`),\n
KEY `quantity` (`quantity`),\n KEY `quantity` (`quantity`),\n
KEY `section_uid` (`section_uid`),\n KEY `section_uid` (`section_uid`),\n
KEY `mirror_section_uid` (`mirror_section_uid`),\n KEY `mirror_section_uid` (`mirror_section_uid`),\n
...@@ -133,6 +134,7 @@ ...@@ -133,6 +134,7 @@
<key> <string>raw</string> </key> <key> <string>raw</string> </key>
<value> <string>CREATE TABLE `inventory_stock` (\n <value> <string>CREATE TABLE `inventory_stock` (\n
`uid` BIGINT UNSIGNED NOT NULL,\n `uid` BIGINT UNSIGNED NOT NULL,\n
`order_id` TINYINT UNSIGNED NOT NULL,\n
`node_uid` BIGINT UNSIGNED,\n `node_uid` BIGINT UNSIGNED,\n
`section_uid` BIGINT UNSIGNED,\n `section_uid` BIGINT UNSIGNED,\n
`payment_uid` BIGINT UNSIGNED,\n `payment_uid` BIGINT UNSIGNED,\n
...@@ -149,7 +151,7 @@ ...@@ -149,7 +151,7 @@
`simulation_state` varchar(255) default \'\',\n `simulation_state` varchar(255) default \'\',\n
`variation_text` VARCHAR(255),\n `variation_text` VARCHAR(255),\n
`sub_variation_text` VARCHAR(255),\n `sub_variation_text` VARCHAR(255),\n
KEY `uid` (`uid`),\n PRIMARY KEY (`uid`, `order_id`),\n
KEY `quantity` (`quantity`),\n KEY `quantity` (`quantity`),\n
KEY `section_uid` (`section_uid`),\n KEY `section_uid` (`section_uid`),\n
KEY `mirror_section_uid` (`mirror_section_uid`),\n KEY `mirror_section_uid` (`mirror_section_uid`),\n
......
...@@ -101,7 +101,7 @@ CREATE TABLE `item` (\n ...@@ -101,7 +101,7 @@ CREATE TABLE `item` (\n
`aggregate_uid` BIGINT UNSIGNED default \'0\',\n `aggregate_uid` BIGINT UNSIGNED default \'0\',\n
`variation_text` VARCHAR(255),\n `variation_text` VARCHAR(255),\n
`simulation_state` VARCHAR(255) default \'\',\n `simulation_state` VARCHAR(255) default \'\',\n
KEY `uid` (`uid`),\n PRIMARY KEY (`uid`, `aggregate_uid`),\n
KEY `section_uid` (`section_uid`),\n KEY `section_uid` (`section_uid`),\n
KEY `resource_uid` (`resource_uid`),\n KEY `resource_uid` (`resource_uid`),\n
KEY `variation_text` (`variation_text`),\n KEY `variation_text` (`variation_text`),\n
...@@ -157,7 +157,7 @@ CREATE TABLE `item` (\n ...@@ -157,7 +157,7 @@ CREATE TABLE `item` (\n
`aggregate_uid` BIGINT UNSIGNED default \'0\',\n `aggregate_uid` BIGINT UNSIGNED default \'0\',\n
`variation_text` VARCHAR(255),\n `variation_text` VARCHAR(255),\n
`simulation_state` VARCHAR(255) default \'\',\n `simulation_state` VARCHAR(255) default \'\',\n
KEY `uid` (`uid`),\n PRIMARY KEY (`uid`, `aggregate_uid`),\n
KEY `section_uid` (`section_uid`),\n KEY `section_uid` (`section_uid`),\n
KEY `resource_uid` (`resource_uid`),\n KEY `resource_uid` (`resource_uid`),\n
KEY `variation_text` (`variation_text`),\n KEY `variation_text` (`variation_text`),\n
......
...@@ -100,7 +100,7 @@ CREATE TABLE `predicate_category` (\n ...@@ -100,7 +100,7 @@ CREATE TABLE `predicate_category` (\n
`category_uid` BIGINT UNSIGNED default \'0\',\n `category_uid` BIGINT UNSIGNED default \'0\',\n
`base_category_uid` BIGINT UNSIGNED default \'0\',\n `base_category_uid` BIGINT UNSIGNED default \'0\',\n
`category_strict_membership` tinyint(1) default \'0\',\n `category_strict_membership` tinyint(1) default \'0\',\n
KEY `uid` (`uid`),\n PRIMARY KEY `uid` (`uid`, `category_uid`, `base_category_uid`, `category_strict_membership`),\n
KEY `category_strict_membership` (`category_strict_membership`),\n KEY `category_strict_membership` (`category_strict_membership`),\n
KEY `Membership` (`category_uid`,`base_category_uid`),\n KEY `Membership` (`category_uid`,`base_category_uid`),\n
KEY `FuzzyMembership` (`category_uid`)\n KEY `FuzzyMembership` (`category_uid`)\n
...@@ -148,7 +148,7 @@ CREATE TABLE `predicate_category` (\n ...@@ -148,7 +148,7 @@ CREATE TABLE `predicate_category` (\n
`category_uid` BIGINT UNSIGNED default \'0\',\n `category_uid` BIGINT UNSIGNED default \'0\',\n
`base_category_uid` BIGINT UNSIGNED default \'0\',\n `base_category_uid` BIGINT UNSIGNED default \'0\',\n
`category_strict_membership` tinyint(1) default \'0\',\n `category_strict_membership` tinyint(1) default \'0\',\n
KEY `uid` (`uid`),\n PRIMARY KEY `uid` (`uid`, `category_uid`, `base_category_uid`, `category_strict_membership`),\n
KEY `category_strict_membership` (`category_strict_membership`),\n KEY `category_strict_membership` (`category_strict_membership`),\n
KEY `Membership` (`category_uid`,`base_category_uid`),\n KEY `Membership` (`category_uid`,`base_category_uid`),\n
KEY `FuzzyMembership` (`category_uid`)\n KEY `FuzzyMembership` (`category_uid`)\n
......
...@@ -97,6 +97,7 @@ ...@@ -97,6 +97,7 @@
#\n #\n
CREATE TABLE `stock` (\n CREATE TABLE `stock` (\n
`uid` BIGINT UNSIGNED NOT NULL,\n `uid` BIGINT UNSIGNED NOT NULL,\n
`order_id` TINYINT UNSIGNED NOT NULL,\n
`node_uid` BIGINT UNSIGNED,\n `node_uid` BIGINT UNSIGNED,\n
`section_uid` BIGINT UNSIGNED,\n `section_uid` BIGINT UNSIGNED,\n
`payment_uid` BIGINT UNSIGNED,\n `payment_uid` BIGINT UNSIGNED,\n
...@@ -113,7 +114,7 @@ CREATE TABLE `stock` (\n ...@@ -113,7 +114,7 @@ CREATE TABLE `stock` (\n
`simulation_state` varchar(255) default \'\',\n `simulation_state` varchar(255) default \'\',\n
`variation_text` VARCHAR(255),\n `variation_text` VARCHAR(255),\n
`sub_variation_text` VARCHAR(255),\n `sub_variation_text` VARCHAR(255),\n
KEY `uid` (`uid`),\n PRIMARY KEY (`uid`, `order_id`),\n
KEY `quantity` (`quantity`),\n KEY `quantity` (`quantity`),\n
KEY `section_uid` (`section_uid`),\n KEY `section_uid` (`section_uid`),\n
KEY `mirror_section_uid` (`mirror_section_uid`),\n KEY `mirror_section_uid` (`mirror_section_uid`),\n
...@@ -168,6 +169,7 @@ CREATE TABLE `stock` (\n ...@@ -168,6 +169,7 @@ CREATE TABLE `stock` (\n
#\n #\n
CREATE TABLE `stock` (\n CREATE TABLE `stock` (\n
`uid` BIGINT UNSIGNED NOT NULL,\n `uid` BIGINT UNSIGNED NOT NULL,\n
`order_id` TINYINT UNSIGNED NOT NULL,\n
`node_uid` BIGINT UNSIGNED,\n `node_uid` BIGINT UNSIGNED,\n
`section_uid` BIGINT UNSIGNED,\n `section_uid` BIGINT UNSIGNED,\n
`payment_uid` BIGINT UNSIGNED,\n `payment_uid` BIGINT UNSIGNED,\n
...@@ -184,7 +186,7 @@ CREATE TABLE `stock` (\n ...@@ -184,7 +186,7 @@ CREATE TABLE `stock` (\n
`simulation_state` varchar(255) default \'\',\n `simulation_state` varchar(255) default \'\',\n
`variation_text` VARCHAR(255),\n `variation_text` VARCHAR(255),\n
`sub_variation_text` VARCHAR(255),\n `sub_variation_text` VARCHAR(255),\n
KEY `uid` (`uid`),\n PRIMARY KEY (`uid`, `order_id`),\n
KEY `quantity` (`quantity`),\n KEY `quantity` (`quantity`),\n
KEY `section_uid` (`section_uid`),\n KEY `section_uid` (`section_uid`),\n
KEY `mirror_section_uid` (`mirror_section_uid`),\n KEY `mirror_section_uid` (`mirror_section_uid`),\n
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment