db_schema.xml 148 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063
  1. <?xml version="1.0"?>
  2. <!--
  3. /**
  4. * Copyright © Magento, Inc. All rights reserved.
  5. * See COPYING.txt for license details.
  6. */
  7. -->
  8. <schema xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  9. xsi:noNamespaceSchemaLocation="urn:magento:framework:Setup/Declaration/Schema/etc/schema.xsd">
  10. <table name="sales_order" resource="sales" engine="innodb" comment="Sales Flat Order">
  11. <column xsi:type="int" name="entity_id" padding="10" unsigned="true" nullable="false" identity="true"
  12. comment="Entity Id"/>
  13. <column xsi:type="varchar" name="state" nullable="true" length="32" comment="State"/>
  14. <column xsi:type="varchar" name="status" nullable="true" length="32" comment="Status"/>
  15. <column xsi:type="varchar" name="coupon_code" nullable="true" length="255" comment="Coupon Code"/>
  16. <column xsi:type="varchar" name="protect_code" nullable="true" length="255" comment="Protect Code"/>
  17. <column xsi:type="varchar" name="shipping_description" nullable="true" length="255"
  18. comment="Shipping Description"/>
  19. <column xsi:type="smallint" name="is_virtual" padding="5" unsigned="true" nullable="true" identity="false"
  20. comment="Is Virtual"/>
  21. <column xsi:type="smallint" name="store_id" padding="5" unsigned="true" nullable="true" identity="false"
  22. comment="Store Id"/>
  23. <column xsi:type="int" name="customer_id" padding="10" unsigned="true" nullable="true" identity="false"
  24. comment="Customer Id"/>
  25. <column xsi:type="decimal" name="base_discount_amount" scale="4" precision="20" unsigned="false"
  26. nullable="true" comment="Base Discount Amount"/>
  27. <column xsi:type="decimal" name="base_discount_canceled" scale="4" precision="20" unsigned="false"
  28. nullable="true" comment="Base Discount Canceled"/>
  29. <column xsi:type="decimal" name="base_discount_invoiced" scale="4" precision="20" unsigned="false"
  30. nullable="true" comment="Base Discount Invoiced"/>
  31. <column xsi:type="decimal" name="base_discount_refunded" scale="4" precision="20" unsigned="false"
  32. nullable="true" comment="Base Discount Refunded"/>
  33. <column xsi:type="decimal" name="base_grand_total" scale="4" precision="20" unsigned="false" nullable="true"
  34. comment="Base Grand Total"/>
  35. <column xsi:type="decimal" name="base_shipping_amount" scale="4" precision="20" unsigned="false"
  36. nullable="true" comment="Base Shipping Amount"/>
  37. <column xsi:type="decimal" name="base_shipping_canceled" scale="4" precision="20" unsigned="false"
  38. nullable="true" comment="Base Shipping Canceled"/>
  39. <column xsi:type="decimal" name="base_shipping_invoiced" scale="4" precision="20" unsigned="false"
  40. nullable="true" comment="Base Shipping Invoiced"/>
  41. <column xsi:type="decimal" name="base_shipping_refunded" scale="4" precision="20" unsigned="false"
  42. nullable="true" comment="Base Shipping Refunded"/>
  43. <column xsi:type="decimal" name="base_shipping_tax_amount" scale="4" precision="20" unsigned="false"
  44. nullable="true" comment="Base Shipping Tax Amount"/>
  45. <column xsi:type="decimal" name="base_shipping_tax_refunded" scale="4" precision="20" unsigned="false"
  46. nullable="true" comment="Base Shipping Tax Refunded"/>
  47. <column xsi:type="decimal" name="base_subtotal" scale="4" precision="20" unsigned="false" nullable="true"
  48. comment="Base Subtotal"/>
  49. <column xsi:type="decimal" name="base_subtotal_canceled" scale="4" precision="20" unsigned="false"
  50. nullable="true" comment="Base Subtotal Canceled"/>
  51. <column xsi:type="decimal" name="base_subtotal_invoiced" scale="4" precision="20" unsigned="false"
  52. nullable="true" comment="Base Subtotal Invoiced"/>
  53. <column xsi:type="decimal" name="base_subtotal_refunded" scale="4" precision="20" unsigned="false"
  54. nullable="true" comment="Base Subtotal Refunded"/>
  55. <column xsi:type="decimal" name="base_tax_amount" scale="4" precision="20" unsigned="false" nullable="true"
  56. comment="Base Tax Amount"/>
  57. <column xsi:type="decimal" name="base_tax_canceled" scale="4" precision="20" unsigned="false" nullable="true"
  58. comment="Base Tax Canceled"/>
  59. <column xsi:type="decimal" name="base_tax_invoiced" scale="4" precision="20" unsigned="false" nullable="true"
  60. comment="Base Tax Invoiced"/>
  61. <column xsi:type="decimal" name="base_tax_refunded" scale="4" precision="20" unsigned="false" nullable="true"
  62. comment="Base Tax Refunded"/>
  63. <column xsi:type="decimal" name="base_to_global_rate" scale="4" precision="20" unsigned="false" nullable="true"
  64. comment="Base To Global Rate"/>
  65. <column xsi:type="decimal" name="base_to_order_rate" scale="4" precision="20" unsigned="false" nullable="true"
  66. comment="Base To Order Rate"/>
  67. <column xsi:type="decimal" name="base_total_canceled" scale="4" precision="20" unsigned="false" nullable="true"
  68. comment="Base Total Canceled"/>
  69. <column xsi:type="decimal" name="base_total_invoiced" scale="4" precision="20" unsigned="false" nullable="true"
  70. comment="Base Total Invoiced"/>
  71. <column xsi:type="decimal" name="base_total_invoiced_cost" scale="4" precision="20" unsigned="false"
  72. nullable="true" comment="Base Total Invoiced Cost"/>
  73. <column xsi:type="decimal" name="base_total_offline_refunded" scale="4" precision="20" unsigned="false"
  74. nullable="true" comment="Base Total Offline Refunded"/>
  75. <column xsi:type="decimal" name="base_total_online_refunded" scale="4" precision="20" unsigned="false"
  76. nullable="true" comment="Base Total Online Refunded"/>
  77. <column xsi:type="decimal" name="base_total_paid" scale="4" precision="20" unsigned="false" nullable="true"
  78. comment="Base Total Paid"/>
  79. <column xsi:type="decimal" name="base_total_qty_ordered" scale="4" precision="12" unsigned="false"
  80. nullable="true" comment="Base Total Qty Ordered"/>
  81. <column xsi:type="decimal" name="base_total_refunded" scale="4" precision="20" unsigned="false" nullable="true"
  82. comment="Base Total Refunded"/>
  83. <column xsi:type="decimal" name="discount_amount" scale="4" precision="20" unsigned="false" nullable="true"
  84. comment="Discount Amount"/>
  85. <column xsi:type="decimal" name="discount_canceled" scale="4" precision="20" unsigned="false" nullable="true"
  86. comment="Discount Canceled"/>
  87. <column xsi:type="decimal" name="discount_invoiced" scale="4" precision="20" unsigned="false" nullable="true"
  88. comment="Discount Invoiced"/>
  89. <column xsi:type="decimal" name="discount_refunded" scale="4" precision="20" unsigned="false" nullable="true"
  90. comment="Discount Refunded"/>
  91. <column xsi:type="decimal" name="grand_total" scale="4" precision="20" unsigned="false" nullable="true"
  92. comment="Grand Total"/>
  93. <column xsi:type="decimal" name="shipping_amount" scale="4" precision="20" unsigned="false" nullable="true"
  94. comment="Shipping Amount"/>
  95. <column xsi:type="decimal" name="shipping_canceled" scale="4" precision="20" unsigned="false" nullable="true"
  96. comment="Shipping Canceled"/>
  97. <column xsi:type="decimal" name="shipping_invoiced" scale="4" precision="20" unsigned="false" nullable="true"
  98. comment="Shipping Invoiced"/>
  99. <column xsi:type="decimal" name="shipping_refunded" scale="4" precision="20" unsigned="false" nullable="true"
  100. comment="Shipping Refunded"/>
  101. <column xsi:type="decimal" name="shipping_tax_amount" scale="4" precision="20" unsigned="false" nullable="true"
  102. comment="Shipping Tax Amount"/>
  103. <column xsi:type="decimal" name="shipping_tax_refunded" scale="4" precision="20" unsigned="false"
  104. nullable="true" comment="Shipping Tax Refunded"/>
  105. <column xsi:type="decimal" name="store_to_base_rate" scale="4" precision="12" unsigned="false" nullable="true"
  106. comment="Store To Base Rate"/>
  107. <column xsi:type="decimal" name="store_to_order_rate" scale="4" precision="12" unsigned="false" nullable="true"
  108. comment="Store To Order Rate"/>
  109. <column xsi:type="decimal" name="subtotal" scale="4" precision="20" unsigned="false" nullable="true"
  110. comment="Subtotal"/>
  111. <column xsi:type="decimal" name="subtotal_canceled" scale="4" precision="20" unsigned="false" nullable="true"
  112. comment="Subtotal Canceled"/>
  113. <column xsi:type="decimal" name="subtotal_invoiced" scale="4" precision="20" unsigned="false" nullable="true"
  114. comment="Subtotal Invoiced"/>
  115. <column xsi:type="decimal" name="subtotal_refunded" scale="4" precision="20" unsigned="false" nullable="true"
  116. comment="Subtotal Refunded"/>
  117. <column xsi:type="decimal" name="tax_amount" scale="4" precision="20" unsigned="false" nullable="true"
  118. comment="Tax Amount"/>
  119. <column xsi:type="decimal" name="tax_canceled" scale="4" precision="20" unsigned="false" nullable="true"
  120. comment="Tax Canceled"/>
  121. <column xsi:type="decimal" name="tax_invoiced" scale="4" precision="20" unsigned="false" nullable="true"
  122. comment="Tax Invoiced"/>
  123. <column xsi:type="decimal" name="tax_refunded" scale="4" precision="20" unsigned="false" nullable="true"
  124. comment="Tax Refunded"/>
  125. <column xsi:type="decimal" name="total_canceled" scale="4" precision="20" unsigned="false" nullable="true"
  126. comment="Total Canceled"/>
  127. <column xsi:type="decimal" name="total_invoiced" scale="4" precision="20" unsigned="false" nullable="true"
  128. comment="Total Invoiced"/>
  129. <column xsi:type="decimal" name="total_offline_refunded" scale="4" precision="20" unsigned="false"
  130. nullable="true" comment="Total Offline Refunded"/>
  131. <column xsi:type="decimal" name="total_online_refunded" scale="4" precision="20" unsigned="false"
  132. nullable="true" comment="Total Online Refunded"/>
  133. <column xsi:type="decimal" name="total_paid" scale="4" precision="20" unsigned="false" nullable="true"
  134. comment="Total Paid"/>
  135. <column xsi:type="decimal" name="total_qty_ordered" scale="4" precision="12" unsigned="false" nullable="true"
  136. comment="Total Qty Ordered"/>
  137. <column xsi:type="decimal" name="total_refunded" scale="4" precision="20" unsigned="false" nullable="true"
  138. comment="Total Refunded"/>
  139. <column xsi:type="smallint" name="can_ship_partially" padding="5" unsigned="true" nullable="true"
  140. identity="false" comment="Can Ship Partially"/>
  141. <column xsi:type="smallint" name="can_ship_partially_item" padding="5" unsigned="true" nullable="true"
  142. identity="false" comment="Can Ship Partially Item"/>
  143. <column xsi:type="smallint" name="customer_is_guest" padding="5" unsigned="true" nullable="true"
  144. identity="false" comment="Customer Is Guest"/>
  145. <column xsi:type="smallint" name="customer_note_notify" padding="5" unsigned="true" nullable="true"
  146. identity="false" comment="Customer Note Notify"/>
  147. <column xsi:type="int" name="billing_address_id" padding="11" unsigned="false" nullable="true" identity="false"
  148. comment="Billing Address Id"/>
  149. <column xsi:type="int" name="customer_group_id" padding="11" unsigned="false" nullable="true" identity="false"/>
  150. <column xsi:type="int" name="edit_increment" padding="11" unsigned="false" nullable="true" identity="false"
  151. comment="Edit Increment"/>
  152. <column xsi:type="smallint" name="email_sent" padding="5" unsigned="true" nullable="true" identity="false"
  153. comment="Email Sent"/>
  154. <column xsi:type="smallint" name="send_email" padding="5" unsigned="true" nullable="true" identity="false"
  155. comment="Send Email"/>
  156. <column xsi:type="smallint" name="forced_shipment_with_invoice" padding="5" unsigned="true" nullable="true"
  157. identity="false" comment="Forced Do Shipment With Invoice"/>
  158. <column xsi:type="int" name="payment_auth_expiration" padding="11" unsigned="false" nullable="true"
  159. identity="false" comment="Payment Authorization Expiration"/>
  160. <column xsi:type="int" name="quote_address_id" padding="11" unsigned="false" nullable="true" identity="false"
  161. comment="Quote Address Id"/>
  162. <column xsi:type="int" name="quote_id" padding="11" unsigned="false" nullable="true" identity="false"
  163. comment="Quote Id"/>
  164. <column xsi:type="int" name="shipping_address_id" padding="11" unsigned="false" nullable="true" identity="false"
  165. comment="Shipping Address Id"/>
  166. <column xsi:type="decimal" name="adjustment_negative" scale="4" precision="20" unsigned="false" nullable="true"
  167. comment="Adjustment Negative"/>
  168. <column xsi:type="decimal" name="adjustment_positive" scale="4" precision="20" unsigned="false" nullable="true"
  169. comment="Adjustment Positive"/>
  170. <column xsi:type="decimal" name="base_adjustment_negative" scale="4" precision="20" unsigned="false"
  171. nullable="true" comment="Base Adjustment Negative"/>
  172. <column xsi:type="decimal" name="base_adjustment_positive" scale="4" precision="20" unsigned="false"
  173. nullable="true" comment="Base Adjustment Positive"/>
  174. <column xsi:type="decimal" name="base_shipping_discount_amount" scale="4" precision="20" unsigned="false"
  175. nullable="true" comment="Base Shipping Discount Amount"/>
  176. <column xsi:type="decimal" name="base_subtotal_incl_tax" scale="4" precision="20" unsigned="false"
  177. nullable="true" comment="Base Subtotal Incl Tax"/>
  178. <column xsi:type="decimal" name="base_total_due" scale="4" precision="20" unsigned="false" nullable="true"
  179. comment="Base Total Due"/>
  180. <column xsi:type="decimal" name="payment_authorization_amount" scale="4" precision="20" unsigned="false"
  181. nullable="true" comment="Payment Authorization Amount"/>
  182. <column xsi:type="decimal" name="shipping_discount_amount" scale="4" precision="20" unsigned="false"
  183. nullable="true" comment="Shipping Discount Amount"/>
  184. <column xsi:type="decimal" name="subtotal_incl_tax" scale="4" precision="20" unsigned="false" nullable="true"
  185. comment="Subtotal Incl Tax"/>
  186. <column xsi:type="decimal" name="total_due" scale="4" precision="20" unsigned="false" nullable="true"
  187. comment="Total Due"/>
  188. <column xsi:type="decimal" name="weight" scale="4" precision="12" unsigned="false" nullable="true"
  189. comment="Weight"/>
  190. <column xsi:type="datetime" name="customer_dob" on_update="false" nullable="true" comment="Customer Dob"/>
  191. <column xsi:type="varchar" name="increment_id" nullable="true" length="32" comment="Increment Id"/>
  192. <column xsi:type="varchar" name="applied_rule_ids" nullable="true" length="128" comment="Applied Rule Ids"/>
  193. <column xsi:type="varchar" name="base_currency_code" nullable="true" length="3" comment="Base Currency Code"/>
  194. <column xsi:type="varchar" name="customer_email" nullable="true" length="128" comment="Customer Email"/>
  195. <column xsi:type="varchar" name="customer_firstname" nullable="true" length="128" comment="Customer Firstname"/>
  196. <column xsi:type="varchar" name="customer_lastname" nullable="true" length="128" comment="Customer Lastname"/>
  197. <column xsi:type="varchar" name="customer_middlename" nullable="true" length="128"
  198. comment="Customer Middlename"/>
  199. <column xsi:type="varchar" name="customer_prefix" nullable="true" length="32" comment="Customer Prefix"/>
  200. <column xsi:type="varchar" name="customer_suffix" nullable="true" length="32" comment="Customer Suffix"/>
  201. <column xsi:type="varchar" name="customer_taxvat" nullable="true" length="32" comment="Customer Taxvat"/>
  202. <column xsi:type="varchar" name="discount_description" nullable="true" length="255"
  203. comment="Discount Description"/>
  204. <column xsi:type="varchar" name="ext_customer_id" nullable="true" length="32" comment="Ext Customer Id"/>
  205. <column xsi:type="varchar" name="ext_order_id" nullable="true" length="32" comment="Ext Order Id"/>
  206. <column xsi:type="varchar" name="global_currency_code" nullable="true" length="3"
  207. comment="Global Currency Code"/>
  208. <column xsi:type="varchar" name="hold_before_state" nullable="true" length="32" comment="Hold Before State"/>
  209. <column xsi:type="varchar" name="hold_before_status" nullable="true" length="32" comment="Hold Before Status"/>
  210. <column xsi:type="varchar" name="order_currency_code" nullable="true" length="3" comment="Order Currency Code"/>
  211. <column xsi:type="varchar" name="original_increment_id" nullable="true" length="32"
  212. comment="Original Increment Id"/>
  213. <column xsi:type="varchar" name="relation_child_id" nullable="true" length="32" comment="Relation Child Id"/>
  214. <column xsi:type="varchar" name="relation_child_real_id" nullable="true" length="32"
  215. comment="Relation Child Real Id"/>
  216. <column xsi:type="varchar" name="relation_parent_id" nullable="true" length="32" comment="Relation Parent Id"/>
  217. <column xsi:type="varchar" name="relation_parent_real_id" nullable="true" length="32"
  218. comment="Relation Parent Real Id"/>
  219. <column xsi:type="varchar" name="remote_ip" nullable="true" length="45" comment="Remote Ip"/>
  220. <column xsi:type="varchar" name="shipping_method" nullable="true" length="120"/>
  221. <column xsi:type="varchar" name="store_currency_code" nullable="true" length="3" comment="Store Currency Code"/>
  222. <column xsi:type="varchar" name="store_name" nullable="true" length="32" comment="Store Name"/>
  223. <column xsi:type="varchar" name="x_forwarded_for" nullable="true" length="32" comment="X Forwarded For"/>
  224. <column xsi:type="text" name="customer_note" nullable="true" comment="Customer Note"/>
  225. <column xsi:type="timestamp" name="created_at" on_update="false" nullable="false" default="CURRENT_TIMESTAMP"
  226. comment="Created At"/>
  227. <column xsi:type="timestamp" name="updated_at" on_update="true" nullable="false" default="CURRENT_TIMESTAMP"
  228. comment="Updated At"/>
  229. <column xsi:type="smallint" name="total_item_count" padding="5" unsigned="true" nullable="false"
  230. identity="false" default="0" comment="Total Item Count"/>
  231. <column xsi:type="int" name="customer_gender" padding="11" unsigned="false" nullable="true" identity="false"
  232. comment="Customer Gender"/>
  233. <column xsi:type="decimal" name="discount_tax_compensation_amount" scale="4" precision="20" unsigned="false"
  234. nullable="true" comment="Discount Tax Compensation Amount"/>
  235. <column xsi:type="decimal" name="base_discount_tax_compensation_amount" scale="4" precision="20"
  236. unsigned="false" nullable="true" comment="Base Discount Tax Compensation Amount"/>
  237. <column xsi:type="decimal" name="shipping_discount_tax_compensation_amount" scale="4" precision="20"
  238. unsigned="false" nullable="true" comment="Shipping Discount Tax Compensation Amount"/>
  239. <column xsi:type="decimal" name="base_shipping_discount_tax_compensation_amnt" scale="4" precision="20"
  240. unsigned="false" nullable="true" comment="Base Shipping Discount Tax Compensation Amount"/>
  241. <column xsi:type="decimal" name="discount_tax_compensation_invoiced" scale="4" precision="20" unsigned="false"
  242. nullable="true" comment="Discount Tax Compensation Invoiced"/>
  243. <column xsi:type="decimal" name="base_discount_tax_compensation_invoiced" scale="4" precision="20"
  244. unsigned="false" nullable="true" comment="Base Discount Tax Compensation Invoiced"/>
  245. <column xsi:type="decimal" name="discount_tax_compensation_refunded" scale="4" precision="20" unsigned="false"
  246. nullable="true" comment="Discount Tax Compensation Refunded"/>
  247. <column xsi:type="decimal" name="base_discount_tax_compensation_refunded" scale="4" precision="20"
  248. unsigned="false" nullable="true" comment="Base Discount Tax Compensation Refunded"/>
  249. <column xsi:type="decimal" name="shipping_incl_tax" scale="4" precision="20" unsigned="false" nullable="true"
  250. comment="Shipping Incl Tax"/>
  251. <column xsi:type="decimal" name="base_shipping_incl_tax" scale="4" precision="20" unsigned="false"
  252. nullable="true" comment="Base Shipping Incl Tax"/>
  253. <column xsi:type="varchar" name="coupon_rule_name" nullable="true" length="255"
  254. comment="Coupon Sales Rule Name"/>
  255. <constraint xsi:type="primary" referenceId="PRIMARY">
  256. <column name="entity_id"/>
  257. </constraint>
  258. <constraint xsi:type="foreign" referenceId="SALES_ORDER_CUSTOMER_ID_CUSTOMER_ENTITY_ENTITY_ID" table="sales_order"
  259. column="customer_id" referenceTable="customer_entity" referenceColumn="entity_id"
  260. onDelete="SET NULL"/>
  261. <constraint xsi:type="foreign" referenceId="SALES_ORDER_STORE_ID_STORE_STORE_ID" table="sales_order" column="store_id"
  262. referenceTable="store" referenceColumn="store_id" onDelete="SET NULL"/>
  263. <constraint xsi:type="unique" referenceId="SALES_ORDER_INCREMENT_ID_STORE_ID">
  264. <column name="increment_id"/>
  265. <column name="store_id"/>
  266. </constraint>
  267. <index referenceId="SALES_ORDER_STATUS" indexType="btree">
  268. <column name="status"/>
  269. </index>
  270. <index referenceId="SALES_ORDER_STATE" indexType="btree">
  271. <column name="state"/>
  272. </index>
  273. <index referenceId="SALES_ORDER_STORE_ID" indexType="btree">
  274. <column name="store_id"/>
  275. </index>
  276. <index referenceId="SALES_ORDER_CREATED_AT" indexType="btree">
  277. <column name="created_at"/>
  278. </index>
  279. <index referenceId="SALES_ORDER_CUSTOMER_ID" indexType="btree">
  280. <column name="customer_id"/>
  281. </index>
  282. <index referenceId="SALES_ORDER_EXT_ORDER_ID" indexType="btree">
  283. <column name="ext_order_id"/>
  284. </index>
  285. <index referenceId="SALES_ORDER_QUOTE_ID" indexType="btree">
  286. <column name="quote_id"/>
  287. </index>
  288. <index referenceId="SALES_ORDER_UPDATED_AT" indexType="btree">
  289. <column name="updated_at"/>
  290. </index>
  291. <index referenceId="SALES_ORDER_SEND_EMAIL" indexType="btree">
  292. <column name="send_email"/>
  293. </index>
  294. <index referenceId="SALES_ORDER_EMAIL_SENT" indexType="btree">
  295. <column name="email_sent"/>
  296. </index>
  297. </table>
  298. <table name="sales_order_grid" resource="sales" engine="innodb" comment="Sales Flat Order Grid">
  299. <column xsi:type="int" name="entity_id" padding="10" unsigned="true" nullable="false" identity="false"
  300. comment="Entity Id"/>
  301. <column xsi:type="varchar" name="status" nullable="true" length="32" comment="Status"/>
  302. <column xsi:type="smallint" name="store_id" padding="5" unsigned="true" nullable="true" identity="false"
  303. comment="Store Id"/>
  304. <column xsi:type="varchar" name="store_name" nullable="true" length="255" comment="Store Name"/>
  305. <column xsi:type="int" name="customer_id" padding="10" unsigned="true" nullable="true" identity="false"
  306. comment="Customer Id"/>
  307. <column xsi:type="decimal" name="base_grand_total" scale="4" precision="20" unsigned="false" nullable="true"
  308. comment="Base Grand Total"/>
  309. <column xsi:type="decimal" name="base_total_paid" scale="4" precision="20" unsigned="false" nullable="true"
  310. comment="Base Total Paid"/>
  311. <column xsi:type="decimal" name="grand_total" scale="4" precision="20" unsigned="false" nullable="true"
  312. comment="Grand Total"/>
  313. <column xsi:type="decimal" name="total_paid" scale="4" precision="20" unsigned="false" nullable="true"
  314. comment="Total Paid"/>
  315. <column xsi:type="varchar" name="increment_id" nullable="true" length="50" comment="Increment Id"/>
  316. <column xsi:type="varchar" name="base_currency_code" nullable="true" length="3" comment="Base Currency Code"/>
  317. <column xsi:type="varchar" name="order_currency_code" nullable="true" length="255"
  318. comment="Order Currency Code"/>
  319. <column xsi:type="varchar" name="shipping_name" nullable="true" length="255" comment="Shipping Name"/>
  320. <column xsi:type="varchar" name="billing_name" nullable="true" length="255" comment="Billing Name"/>
  321. <column xsi:type="timestamp" name="created_at" on_update="false" nullable="true" comment="Created At"/>
  322. <column xsi:type="timestamp" name="updated_at" on_update="false" nullable="true" comment="Updated At"/>
  323. <column xsi:type="varchar" name="billing_address" nullable="true" length="255" comment="Billing Address"/>
  324. <column xsi:type="varchar" name="shipping_address" nullable="true" length="255" comment="Shipping Address"/>
  325. <column xsi:type="varchar" name="shipping_information" nullable="true" length="255"
  326. comment="Shipping Method Name"/>
  327. <column xsi:type="varchar" name="customer_email" nullable="true" length="255" comment="Customer Email"/>
  328. <column xsi:type="varchar" name="customer_group" nullable="true" length="255" comment="Customer Group"/>
  329. <column xsi:type="decimal" name="subtotal" scale="4" precision="20" unsigned="false" nullable="true"
  330. comment="Subtotal"/>
  331. <column xsi:type="decimal" name="shipping_and_handling" scale="4" precision="20" unsigned="false"
  332. nullable="true" comment="Shipping and handling amount"/>
  333. <column xsi:type="varchar" name="customer_name" nullable="true" length="255" comment="Customer Name"/>
  334. <column xsi:type="varchar" name="payment_method" nullable="true" length="255" comment="Payment Method"/>
  335. <column xsi:type="decimal" name="total_refunded" scale="4" precision="20" unsigned="false" nullable="true"
  336. comment="Total Refunded"/>
  337. <constraint xsi:type="primary" referenceId="PRIMARY">
  338. <column name="entity_id"/>
  339. </constraint>
  340. <constraint xsi:type="unique" referenceId="SALES_ORDER_GRID_INCREMENT_ID_STORE_ID">
  341. <column name="increment_id"/>
  342. <column name="store_id"/>
  343. </constraint>
  344. <index referenceId="SALES_ORDER_GRID_STATUS" indexType="btree">
  345. <column name="status"/>
  346. </index>
  347. <index referenceId="SALES_ORDER_GRID_STORE_ID" indexType="btree">
  348. <column name="store_id"/>
  349. </index>
  350. <index referenceId="SALES_ORDER_GRID_BASE_GRAND_TOTAL" indexType="btree">
  351. <column name="base_grand_total"/>
  352. </index>
  353. <index referenceId="SALES_ORDER_GRID_BASE_TOTAL_PAID" indexType="btree">
  354. <column name="base_total_paid"/>
  355. </index>
  356. <index referenceId="SALES_ORDER_GRID_GRAND_TOTAL" indexType="btree">
  357. <column name="grand_total"/>
  358. </index>
  359. <index referenceId="SALES_ORDER_GRID_TOTAL_PAID" indexType="btree">
  360. <column name="total_paid"/>
  361. </index>
  362. <index referenceId="SALES_ORDER_GRID_SHIPPING_NAME" indexType="btree">
  363. <column name="shipping_name"/>
  364. </index>
  365. <index referenceId="SALES_ORDER_GRID_BILLING_NAME" indexType="btree">
  366. <column name="billing_name"/>
  367. </index>
  368. <index referenceId="SALES_ORDER_GRID_CREATED_AT" indexType="btree">
  369. <column name="created_at"/>
  370. </index>
  371. <index referenceId="SALES_ORDER_GRID_CUSTOMER_ID" indexType="btree">
  372. <column name="customer_id"/>
  373. </index>
  374. <index referenceId="SALES_ORDER_GRID_UPDATED_AT" indexType="btree">
  375. <column name="updated_at"/>
  376. </index>
  377. <index referenceId="FTI_65B9E9925EC58F0C7C2E2F6379C233E7" indexType="fulltext">
  378. <column name="increment_id"/>
  379. <column name="billing_name"/>
  380. <column name="shipping_name"/>
  381. <column name="shipping_address"/>
  382. <column name="billing_address"/>
  383. <column name="customer_name"/>
  384. <column name="customer_email"/>
  385. </index>
  386. </table>
  387. <table name="sales_order_address" resource="sales" engine="innodb" comment="Sales Flat Order Address">
  388. <column xsi:type="int" name="entity_id" padding="10" unsigned="true" nullable="false" identity="true"
  389. comment="Entity Id"/>
  390. <column xsi:type="int" name="parent_id" padding="10" unsigned="true" nullable="true" identity="false"
  391. comment="Parent Id"/>
  392. <column xsi:type="int" name="customer_address_id" padding="11" unsigned="false" nullable="true" identity="false"
  393. comment="Customer Address Id"/>
  394. <column xsi:type="int" name="quote_address_id" padding="11" unsigned="false" nullable="true" identity="false"
  395. comment="Quote Address Id"/>
  396. <column xsi:type="int" name="region_id" padding="11" unsigned="false" nullable="true" identity="false"
  397. comment="Region Id"/>
  398. <column xsi:type="int" name="customer_id" padding="11" unsigned="false" nullable="true" identity="false"
  399. comment="Customer Id"/>
  400. <column xsi:type="varchar" name="fax" nullable="true" length="255" comment="Fax"/>
  401. <column xsi:type="varchar" name="region" nullable="true" length="255" comment="Region"/>
  402. <column xsi:type="varchar" name="postcode" nullable="true" length="255" comment="Postcode"/>
  403. <column xsi:type="varchar" name="lastname" nullable="true" length="255" comment="Lastname"/>
  404. <column xsi:type="varchar" name="street" nullable="true" length="255" comment="Street"/>
  405. <column xsi:type="varchar" name="city" nullable="true" length="255" comment="City"/>
  406. <column xsi:type="varchar" name="email" nullable="true" length="255" comment="Email"/>
  407. <column xsi:type="varchar" name="telephone" nullable="true" length="255" comment="Phone Number"/>
  408. <column xsi:type="varchar" name="country_id" nullable="true" length="2" comment="Country Id"/>
  409. <column xsi:type="varchar" name="firstname" nullable="true" length="255" comment="Firstname"/>
  410. <column xsi:type="varchar" name="address_type" nullable="true" length="255" comment="Address Type"/>
  411. <column xsi:type="varchar" name="prefix" nullable="true" length="255" comment="Prefix"/>
  412. <column xsi:type="varchar" name="middlename" nullable="true" length="255" comment="Middlename"/>
  413. <column xsi:type="varchar" name="suffix" nullable="true" length="255" comment="Suffix"/>
  414. <column xsi:type="varchar" name="company" nullable="true" length="255" comment="Company"/>
  415. <column xsi:type="text" name="vat_id" nullable="true" comment="Vat Id"/>
  416. <column xsi:type="smallint" name="vat_is_valid" padding="6" unsigned="false" nullable="true" identity="false"
  417. comment="Vat Is Valid"/>
  418. <column xsi:type="text" name="vat_request_id" nullable="true" comment="Vat Request Id"/>
  419. <column xsi:type="text" name="vat_request_date" nullable="true" comment="Vat Request Date"/>
  420. <column xsi:type="smallint" name="vat_request_success" padding="6" unsigned="false" nullable="true"
  421. identity="false" comment="Vat Request Success"/>
  422. <constraint xsi:type="primary" referenceId="PRIMARY">
  423. <column name="entity_id"/>
  424. </constraint>
  425. <constraint xsi:type="foreign" referenceId="SALES_ORDER_ADDRESS_PARENT_ID_SALES_ORDER_ENTITY_ID"
  426. table="sales_order_address" column="parent_id" referenceTable="sales_order"
  427. referenceColumn="entity_id" onDelete="CASCADE"/>
  428. <index referenceId="SALES_ORDER_ADDRESS_PARENT_ID" indexType="btree">
  429. <column name="parent_id"/>
  430. </index>
  431. </table>
  432. <table name="sales_order_status_history" resource="sales" engine="innodb" comment="Sales Flat Order Status History">
  433. <column xsi:type="int" name="entity_id" padding="10" unsigned="true" nullable="false" identity="true"
  434. comment="Entity Id"/>
  435. <column xsi:type="int" name="parent_id" padding="10" unsigned="true" nullable="false" identity="false"
  436. comment="Parent Id"/>
  437. <column xsi:type="int" name="is_customer_notified" padding="11" unsigned="false" nullable="true"
  438. identity="false" comment="Is Customer Notified"/>
  439. <column xsi:type="smallint" name="is_visible_on_front" padding="5" unsigned="true" nullable="false"
  440. identity="false" default="0" comment="Is Visible On Front"/>
  441. <column xsi:type="text" name="comment" nullable="true" comment="Comment"/>
  442. <column xsi:type="varchar" name="status" nullable="true" length="32" comment="Status"/>
  443. <column xsi:type="timestamp" name="created_at" on_update="false" nullable="false" default="CURRENT_TIMESTAMP"
  444. comment="Created At"/>
  445. <column xsi:type="varchar" name="entity_name" nullable="true" length="32"
  446. comment="Shows what entity history is bind to."/>
  447. <constraint xsi:type="primary" referenceId="PRIMARY">
  448. <column name="entity_id"/>
  449. </constraint>
  450. <constraint xsi:type="foreign" referenceId="SALES_ORDER_STATUS_HISTORY_PARENT_ID_SALES_ORDER_ENTITY_ID"
  451. table="sales_order_status_history" column="parent_id" referenceTable="sales_order"
  452. referenceColumn="entity_id" onDelete="CASCADE"/>
  453. <index referenceId="SALES_ORDER_STATUS_HISTORY_PARENT_ID" indexType="btree">
  454. <column name="parent_id"/>
  455. </index>
  456. <index referenceId="SALES_ORDER_STATUS_HISTORY_CREATED_AT" indexType="btree">
  457. <column name="created_at"/>
  458. </index>
  459. </table>
  460. <table name="sales_order_item" resource="sales" engine="innodb" comment="Sales Flat Order Item">
  461. <column xsi:type="int" name="item_id" padding="10" unsigned="true" nullable="false" identity="true"
  462. comment="Item Id"/>
  463. <column xsi:type="int" name="order_id" padding="10" unsigned="true" nullable="false" identity="false"
  464. default="0" comment="Order Id"/>
  465. <column xsi:type="int" name="parent_item_id" padding="10" unsigned="true" nullable="true" identity="false"
  466. comment="Parent Item Id"/>
  467. <column xsi:type="int" name="quote_item_id" padding="10" unsigned="true" nullable="true" identity="false"
  468. comment="Quote Item Id"/>
  469. <column xsi:type="smallint" name="store_id" padding="5" unsigned="true" nullable="true" identity="false"
  470. comment="Store Id"/>
  471. <column xsi:type="timestamp" name="created_at" on_update="false" nullable="false" default="CURRENT_TIMESTAMP"
  472. comment="Created At"/>
  473. <column xsi:type="timestamp" name="updated_at" on_update="true" nullable="false" default="CURRENT_TIMESTAMP"
  474. comment="Updated At"/>
  475. <column xsi:type="int" name="product_id" padding="10" unsigned="true" nullable="true" identity="false"
  476. comment="Product Id"/>
  477. <column xsi:type="varchar" name="product_type" nullable="true" length="255" comment="Product Type"/>
  478. <column xsi:type="text" name="product_options" nullable="true" comment="Product Options"/>
  479. <column xsi:type="decimal" name="weight" scale="4" precision="12" unsigned="false" nullable="true" default="0"
  480. comment="Weight"/>
  481. <column xsi:type="smallint" name="is_virtual" padding="5" unsigned="true" nullable="true" identity="false"
  482. comment="Is Virtual"/>
  483. <column xsi:type="varchar" name="sku" nullable="true" length="255" comment="Sku"/>
  484. <column xsi:type="varchar" name="name" nullable="true" length="255" comment="Name"/>
  485. <column xsi:type="text" name="description" nullable="true" comment="Description"/>
  486. <column xsi:type="text" name="applied_rule_ids" nullable="true" comment="Applied Rule Ids"/>
  487. <column xsi:type="text" name="additional_data" nullable="true" comment="Additional Data"/>
  488. <column xsi:type="smallint" name="is_qty_decimal" padding="5" unsigned="true" nullable="true" identity="false"
  489. comment="Is Qty Decimal"/>
  490. <column xsi:type="smallint" name="no_discount" padding="5" unsigned="true" nullable="false" identity="false"
  491. default="0" comment="No Discount"/>
  492. <column xsi:type="decimal" name="qty_backordered" scale="4" precision="12" unsigned="false" nullable="true"
  493. default="0" comment="Qty Backordered"/>
  494. <column xsi:type="decimal" name="qty_canceled" scale="4" precision="12" unsigned="false" nullable="true"
  495. default="0" comment="Qty Canceled"/>
  496. <column xsi:type="decimal" name="qty_invoiced" scale="4" precision="12" unsigned="false" nullable="true"
  497. default="0" comment="Qty Invoiced"/>
  498. <column xsi:type="decimal" name="qty_ordered" scale="4" precision="12" unsigned="false" nullable="true"
  499. default="0" comment="Qty Ordered"/>
  500. <column xsi:type="decimal" name="qty_refunded" scale="4" precision="12" unsigned="false" nullable="true"
  501. default="0" comment="Qty Refunded"/>
  502. <column xsi:type="decimal" name="qty_shipped" scale="4" precision="12" unsigned="false" nullable="true"
  503. default="0" comment="Qty Shipped"/>
  504. <column xsi:type="decimal" name="base_cost" scale="4" precision="12" unsigned="false" nullable="true"
  505. default="0" comment="Base Cost"/>
  506. <column xsi:type="decimal" name="price" scale="4" precision="12" unsigned="false" nullable="false" default="0"
  507. comment="Price"/>
  508. <column xsi:type="decimal" name="base_price" scale="4" precision="12" unsigned="false" nullable="false"
  509. default="0" comment="Base Price"/>
  510. <column xsi:type="decimal" name="original_price" scale="4" precision="12" unsigned="false" nullable="true"
  511. comment="Original Price"/>
  512. <column xsi:type="decimal" name="base_original_price" scale="4" precision="12" unsigned="false" nullable="true"
  513. comment="Base Original Price"/>
  514. <column xsi:type="decimal" name="tax_percent" scale="4" precision="12" unsigned="false" nullable="true"
  515. default="0" comment="Tax Percent"/>
  516. <column xsi:type="decimal" name="tax_amount" scale="4" precision="20" unsigned="false" nullable="true"
  517. default="0" comment="Tax Amount"/>
  518. <column xsi:type="decimal" name="base_tax_amount" scale="4" precision="20" unsigned="false" nullable="true"
  519. default="0" comment="Base Tax Amount"/>
  520. <column xsi:type="decimal" name="tax_invoiced" scale="4" precision="20" unsigned="false" nullable="true"
  521. default="0" comment="Tax Invoiced"/>
  522. <column xsi:type="decimal" name="base_tax_invoiced" scale="4" precision="20" unsigned="false" nullable="true"
  523. default="0" comment="Base Tax Invoiced"/>
  524. <column xsi:type="decimal" name="discount_percent" scale="4" precision="12" unsigned="false" nullable="true"
  525. default="0" comment="Discount Percent"/>
  526. <column xsi:type="decimal" name="discount_amount" scale="4" precision="20" unsigned="false" nullable="true"
  527. default="0" comment="Discount Amount"/>
  528. <column xsi:type="decimal" name="base_discount_amount" scale="4" precision="20" unsigned="false"
  529. nullable="true" default="0" comment="Base Discount Amount"/>
  530. <column xsi:type="decimal" name="discount_invoiced" scale="4" precision="20" unsigned="false" nullable="true"
  531. default="0" comment="Discount Invoiced"/>
  532. <column xsi:type="decimal" name="base_discount_invoiced" scale="4" precision="20" unsigned="false"
  533. nullable="true" default="0" comment="Base Discount Invoiced"/>
  534. <column xsi:type="decimal" name="amount_refunded" scale="4" precision="20" unsigned="false" nullable="true"
  535. default="0" comment="Amount Refunded"/>
  536. <column xsi:type="decimal" name="base_amount_refunded" scale="4" precision="20" unsigned="false"
  537. nullable="true" default="0" comment="Base Amount Refunded"/>
  538. <column xsi:type="decimal" name="row_total" scale="4" precision="20" unsigned="false" nullable="false"
  539. default="0" comment="Row Total"/>
  540. <column xsi:type="decimal" name="base_row_total" scale="4" precision="20" unsigned="false" nullable="false"
  541. default="0" comment="Base Row Total"/>
  542. <column xsi:type="decimal" name="row_invoiced" scale="4" precision="20" unsigned="false" nullable="false"
  543. default="0" comment="Row Invoiced"/>
  544. <column xsi:type="decimal" name="base_row_invoiced" scale="4" precision="20" unsigned="false" nullable="false"
  545. default="0" comment="Base Row Invoiced"/>
  546. <column xsi:type="decimal" name="row_weight" scale="4" precision="12" unsigned="false" nullable="true"
  547. default="0" comment="Row Weight"/>
  548. <column xsi:type="decimal" name="base_tax_before_discount" scale="4" precision="20" unsigned="false"
  549. nullable="true" comment="Base Tax Before Discount"/>
  550. <column xsi:type="decimal" name="tax_before_discount" scale="4" precision="20" unsigned="false" nullable="true"
  551. comment="Tax Before Discount"/>
  552. <column xsi:type="varchar" name="ext_order_item_id" nullable="true" length="255" comment="Ext Order Item Id"/>
  553. <column xsi:type="smallint" name="locked_do_invoice" padding="5" unsigned="true" nullable="true"
  554. identity="false" comment="Locked Do Invoice"/>
  555. <column xsi:type="smallint" name="locked_do_ship" padding="5" unsigned="true" nullable="true" identity="false"
  556. comment="Locked Do Ship"/>
  557. <column xsi:type="decimal" name="price_incl_tax" scale="4" precision="20" unsigned="false" nullable="true"
  558. comment="Price Incl Tax"/>
  559. <column xsi:type="decimal" name="base_price_incl_tax" scale="4" precision="20" unsigned="false" nullable="true"
  560. comment="Base Price Incl Tax"/>
  561. <column xsi:type="decimal" name="row_total_incl_tax" scale="4" precision="20" unsigned="false" nullable="true"
  562. comment="Row Total Incl Tax"/>
  563. <column xsi:type="decimal" name="base_row_total_incl_tax" scale="4" precision="20" unsigned="false"
  564. nullable="true" comment="Base Row Total Incl Tax"/>
  565. <column xsi:type="decimal" name="discount_tax_compensation_amount" scale="4" precision="20" unsigned="false"
  566. nullable="true" comment="Discount Tax Compensation Amount"/>
  567. <column xsi:type="decimal" name="base_discount_tax_compensation_amount" scale="4" precision="20"
  568. unsigned="false" nullable="true" comment="Base Discount Tax Compensation Amount"/>
  569. <column xsi:type="decimal" name="discount_tax_compensation_invoiced" scale="4" precision="20" unsigned="false"
  570. nullable="true" comment="Discount Tax Compensation Invoiced"/>
  571. <column xsi:type="decimal" name="base_discount_tax_compensation_invoiced" scale="4" precision="20"
  572. unsigned="false" nullable="true" comment="Base Discount Tax Compensation Invoiced"/>
  573. <column xsi:type="decimal" name="discount_tax_compensation_refunded" scale="4" precision="20" unsigned="false"
  574. nullable="true" comment="Discount Tax Compensation Refunded"/>
  575. <column xsi:type="decimal" name="base_discount_tax_compensation_refunded" scale="4" precision="20"
  576. unsigned="false" nullable="true" comment="Base Discount Tax Compensation Refunded"/>
  577. <column xsi:type="decimal" name="tax_canceled" scale="4" precision="12" unsigned="false" nullable="true"
  578. comment="Tax Canceled"/>
  579. <column xsi:type="decimal" name="discount_tax_compensation_canceled" scale="4" precision="20" unsigned="false"
  580. nullable="true" comment="Discount Tax Compensation Canceled"/>
  581. <column xsi:type="decimal" name="tax_refunded" scale="4" precision="20" unsigned="false" nullable="true"
  582. comment="Tax Refunded"/>
  583. <column xsi:type="decimal" name="base_tax_refunded" scale="4" precision="20" unsigned="false" nullable="true"
  584. comment="Base Tax Refunded"/>
  585. <column xsi:type="decimal" name="discount_refunded" scale="4" precision="20" unsigned="false" nullable="true"
  586. comment="Discount Refunded"/>
  587. <column xsi:type="decimal" name="base_discount_refunded" scale="4" precision="20" unsigned="false"
  588. nullable="true" comment="Base Discount Refunded"/>
  589. <constraint xsi:type="primary" referenceId="PRIMARY">
  590. <column name="item_id"/>
  591. </constraint>
  592. <constraint xsi:type="foreign" referenceId="SALES_ORDER_ITEM_ORDER_ID_SALES_ORDER_ENTITY_ID" table="sales_order_item"
  593. column="order_id" referenceTable="sales_order" referenceColumn="entity_id" onDelete="CASCADE"/>
  594. <constraint xsi:type="foreign" referenceId="SALES_ORDER_ITEM_STORE_ID_STORE_STORE_ID" table="sales_order_item"
  595. column="store_id" referenceTable="store" referenceColumn="store_id" onDelete="SET NULL"/>
  596. <index referenceId="SALES_ORDER_ITEM_ORDER_ID" indexType="btree">
  597. <column name="order_id"/>
  598. </index>
  599. <index referenceId="SALES_ORDER_ITEM_STORE_ID" indexType="btree">
  600. <column name="store_id"/>
  601. </index>
  602. </table>
  603. <table name="sales_order_payment" resource="sales" engine="innodb" comment="Sales Flat Order Payment">
  604. <column xsi:type="int" name="entity_id" padding="10" unsigned="true" nullable="false" identity="true"
  605. comment="Entity Id"/>
  606. <column xsi:type="int" name="parent_id" padding="10" unsigned="true" nullable="false" identity="false"
  607. comment="Parent Id"/>
  608. <column xsi:type="decimal" name="base_shipping_captured" scale="4" precision="20" unsigned="false"
  609. nullable="true" comment="Base Shipping Captured"/>
  610. <column xsi:type="decimal" name="shipping_captured" scale="4" precision="20" unsigned="false" nullable="true"
  611. comment="Shipping Captured"/>
  612. <column xsi:type="decimal" name="amount_refunded" scale="4" precision="20" unsigned="false" nullable="true"
  613. comment="Amount Refunded"/>
  614. <column xsi:type="decimal" name="base_amount_paid" scale="4" precision="20" unsigned="false" nullable="true"
  615. comment="Base Amount Paid"/>
  616. <column xsi:type="decimal" name="amount_canceled" scale="4" precision="20" unsigned="false" nullable="true"
  617. comment="Amount Canceled"/>
  618. <column xsi:type="decimal" name="base_amount_authorized" scale="4" precision="20" unsigned="false"
  619. nullable="true" comment="Base Amount Authorized"/>
  620. <column xsi:type="decimal" name="base_amount_paid_online" scale="4" precision="20" unsigned="false"
  621. nullable="true" comment="Base Amount Paid Online"/>
  622. <column xsi:type="decimal" name="base_amount_refunded_online" scale="4" precision="20" unsigned="false"
  623. nullable="true" comment="Base Amount Refunded Online"/>
  624. <column xsi:type="decimal" name="base_shipping_amount" scale="4" precision="20" unsigned="false"
  625. nullable="true" comment="Base Shipping Amount"/>
  626. <column xsi:type="decimal" name="shipping_amount" scale="4" precision="20" unsigned="false" nullable="true"
  627. comment="Shipping Amount"/>
  628. <column xsi:type="decimal" name="amount_paid" scale="4" precision="20" unsigned="false" nullable="true"
  629. comment="Amount Paid"/>
  630. <column xsi:type="decimal" name="amount_authorized" scale="4" precision="20" unsigned="false" nullable="true"
  631. comment="Amount Authorized"/>
  632. <column xsi:type="decimal" name="base_amount_ordered" scale="4" precision="20" unsigned="false" nullable="true"
  633. comment="Base Amount Ordered"/>
  634. <column xsi:type="decimal" name="base_shipping_refunded" scale="4" precision="20" unsigned="false"
  635. nullable="true" comment="Base Shipping Refunded"/>
  636. <column xsi:type="decimal" name="shipping_refunded" scale="4" precision="20" unsigned="false" nullable="true"
  637. comment="Shipping Refunded"/>
  638. <column xsi:type="decimal" name="base_amount_refunded" scale="4" precision="20" unsigned="false"
  639. nullable="true" comment="Base Amount Refunded"/>
  640. <column xsi:type="decimal" name="amount_ordered" scale="4" precision="20" unsigned="false" nullable="true"
  641. comment="Amount Ordered"/>
  642. <column xsi:type="decimal" name="base_amount_canceled" scale="4" precision="20" unsigned="false"
  643. nullable="true" comment="Base Amount Canceled"/>
  644. <column xsi:type="int" name="quote_payment_id" padding="11" unsigned="false" nullable="true" identity="false"
  645. comment="Quote Payment Id"/>
  646. <column xsi:type="text" name="additional_data" nullable="true" comment="Additional Data"/>
  647. <column xsi:type="varchar" name="cc_exp_month" nullable="true" length="12" comment="Cc Exp Month"/>
  648. <column xsi:type="varchar" name="cc_ss_start_year" nullable="true" length="12" comment="Cc Ss Start Year"/>
  649. <column xsi:type="varchar" name="echeck_bank_name" nullable="true" length="128" comment="Echeck Bank Name"/>
  650. <column xsi:type="varchar" name="method" nullable="true" length="128" comment="Method"/>
  651. <column xsi:type="varchar" name="cc_debug_request_body" nullable="true" length="32"
  652. comment="Cc Debug Request Body"/>
  653. <column xsi:type="varchar" name="cc_secure_verify" nullable="true" length="32" comment="Cc Secure Verify"/>
  654. <column xsi:type="varchar" name="protection_eligibility" nullable="true" length="32"
  655. comment="Protection Eligibility"/>
  656. <column xsi:type="varchar" name="cc_approval" nullable="true" length="32" comment="Cc Approval"/>
  657. <column xsi:type="varchar" name="cc_last_4" nullable="true" length="100" comment="Cc Last 4"/>
  658. <column xsi:type="varchar" name="cc_status_description" nullable="true" length="32"
  659. comment="Cc Status Description"/>
  660. <column xsi:type="varchar" name="echeck_type" nullable="true" length="32" comment="Echeck Type"/>
  661. <column xsi:type="varchar" name="cc_debug_response_serialized" nullable="true" length="32"
  662. comment="Cc Debug Response Serialized"/>
  663. <column xsi:type="varchar" name="cc_ss_start_month" nullable="true" length="128" comment="Cc Ss Start Month"/>
  664. <column xsi:type="varchar" name="echeck_account_type" nullable="true" length="255"
  665. comment="Echeck Account Type"/>
  666. <column xsi:type="varchar" name="last_trans_id" nullable="true" length="255" comment="Last Trans Id"/>
  667. <column xsi:type="varchar" name="cc_cid_status" nullable="true" length="32" comment="Cc Cid Status"/>
  668. <column xsi:type="varchar" name="cc_owner" nullable="true" length="128" comment="Cc Owner"/>
  669. <column xsi:type="varchar" name="cc_type" nullable="true" length="32" comment="Cc Type"/>
  670. <column xsi:type="varchar" name="po_number" nullable="true" length="32" comment="Po Number"/>
  671. <column xsi:type="varchar" name="cc_exp_year" nullable="true" length="4" comment="Cc Exp Year"/>
  672. <column xsi:type="varchar" name="cc_status" nullable="true" length="4" comment="Cc Status"/>
  673. <column xsi:type="varchar" name="echeck_routing_number" nullable="true" length="32"
  674. comment="Echeck Routing Number"/>
  675. <column xsi:type="varchar" name="account_status" nullable="true" length="32" comment="Account Status"/>
  676. <column xsi:type="varchar" name="anet_trans_method" nullable="true" length="32" comment="Anet Trans Method"/>
  677. <column xsi:type="varchar" name="cc_debug_response_body" nullable="true" length="32"
  678. comment="Cc Debug Response Body"/>
  679. <column xsi:type="varchar" name="cc_ss_issue" nullable="true" length="32" comment="Cc Ss Issue"/>
  680. <column xsi:type="varchar" name="echeck_account_name" nullable="true" length="32"
  681. comment="Echeck Account Name"/>
  682. <column xsi:type="varchar" name="cc_avs_status" nullable="true" length="32" comment="Cc Avs Status"/>
  683. <column xsi:type="varchar" name="cc_number_enc" nullable="true" length="128"/>
  684. <column xsi:type="varchar" name="cc_trans_id" nullable="true" length="32" comment="Cc Trans Id"/>
  685. <column xsi:type="varchar" name="address_status" nullable="true" length="32" comment="Address Status"/>
  686. <column xsi:type="text" name="additional_information" nullable="true" comment="Additional Information"/>
  687. <constraint xsi:type="primary" referenceId="PRIMARY">
  688. <column name="entity_id"/>
  689. </constraint>
  690. <constraint xsi:type="foreign" referenceId="SALES_ORDER_PAYMENT_PARENT_ID_SALES_ORDER_ENTITY_ID"
  691. table="sales_order_payment" column="parent_id" referenceTable="sales_order"
  692. referenceColumn="entity_id" onDelete="CASCADE"/>
  693. <index referenceId="SALES_ORDER_PAYMENT_PARENT_ID" indexType="btree">
  694. <column name="parent_id"/>
  695. </index>
  696. </table>
  697. <table name="sales_shipment" resource="sales" engine="innodb" comment="Sales Flat Shipment">
  698. <column xsi:type="int" name="entity_id" padding="10" unsigned="true" nullable="false" identity="true"
  699. comment="Entity Id"/>
  700. <column xsi:type="smallint" name="store_id" padding="5" unsigned="true" nullable="true" identity="false"
  701. comment="Store Id"/>
  702. <column xsi:type="decimal" name="total_weight" scale="4" precision="12" unsigned="false" nullable="true"
  703. comment="Total Weight"/>
  704. <column xsi:type="decimal" name="total_qty" scale="4" precision="12" unsigned="false" nullable="true"
  705. comment="Total Qty"/>
  706. <column xsi:type="smallint" name="email_sent" padding="5" unsigned="true" nullable="true" identity="false"
  707. comment="Email Sent"/>
  708. <column xsi:type="smallint" name="send_email" padding="5" unsigned="true" nullable="true" identity="false"
  709. comment="Send Email"/>
  710. <column xsi:type="int" name="order_id" padding="10" unsigned="true" nullable="false" identity="false"
  711. comment="Order Id"/>
  712. <column xsi:type="int" name="customer_id" padding="11" unsigned="false" nullable="true" identity="false"
  713. comment="Customer Id"/>
  714. <column xsi:type="int" name="shipping_address_id" padding="11" unsigned="false" nullable="true" identity="false"
  715. comment="Shipping Address Id"/>
  716. <column xsi:type="int" name="billing_address_id" padding="11" unsigned="false" nullable="true" identity="false"
  717. comment="Billing Address Id"/>
  718. <column xsi:type="int" name="shipment_status" padding="11" unsigned="false" nullable="true" identity="false"
  719. comment="Shipment Status"/>
  720. <column xsi:type="varchar" name="increment_id" nullable="true" length="50" comment="Increment Id"/>
  721. <column xsi:type="timestamp" name="created_at" on_update="false" nullable="false" default="CURRENT_TIMESTAMP"
  722. comment="Created At"/>
  723. <column xsi:type="timestamp" name="updated_at" on_update="true" nullable="false" default="CURRENT_TIMESTAMP"
  724. comment="Updated At"/>
  725. <column xsi:type="text" name="packages" nullable="true" comment="Packed Products in Packages"/>
  726. <column xsi:type="mediumblob" name="shipping_label" nullable="true" comment="Shipping Label Content"/>
  727. <column xsi:type="text" name="customer_note" nullable="true" comment="Customer Note"/>
  728. <column xsi:type="smallint" name="customer_note_notify" padding="5" unsigned="true" nullable="true"
  729. identity="false" comment="Customer Note Notify"/>
  730. <constraint xsi:type="primary" referenceId="PRIMARY">
  731. <column name="entity_id"/>
  732. </constraint>
  733. <constraint xsi:type="foreign" referenceId="SALES_SHIPMENT_ORDER_ID_SALES_ORDER_ENTITY_ID" table="sales_shipment"
  734. column="order_id" referenceTable="sales_order" referenceColumn="entity_id" onDelete="CASCADE"/>
  735. <constraint xsi:type="foreign" referenceId="SALES_SHIPMENT_STORE_ID_STORE_STORE_ID" table="sales_shipment"
  736. column="store_id" referenceTable="store" referenceColumn="store_id" onDelete="SET NULL"/>
  737. <constraint xsi:type="unique" referenceId="SALES_SHIPMENT_INCREMENT_ID_STORE_ID">
  738. <column name="increment_id"/>
  739. <column name="store_id"/>
  740. </constraint>
  741. <index referenceId="SALES_SHIPMENT_STORE_ID" indexType="btree">
  742. <column name="store_id"/>
  743. </index>
  744. <index referenceId="SALES_SHIPMENT_TOTAL_QTY" indexType="btree">
  745. <column name="total_qty"/>
  746. </index>
  747. <index referenceId="SALES_SHIPMENT_ORDER_ID" indexType="btree">
  748. <column name="order_id"/>
  749. </index>
  750. <index referenceId="SALES_SHIPMENT_CREATED_AT" indexType="btree">
  751. <column name="created_at"/>
  752. </index>
  753. <index referenceId="SALES_SHIPMENT_UPDATED_AT" indexType="btree">
  754. <column name="updated_at"/>
  755. </index>
  756. <index referenceId="SALES_SHIPMENT_SEND_EMAIL" indexType="btree">
  757. <column name="send_email"/>
  758. </index>
  759. <index referenceId="SALES_SHIPMENT_EMAIL_SENT" indexType="btree">
  760. <column name="email_sent"/>
  761. </index>
  762. </table>
  763. <table name="sales_shipment_grid" resource="sales" engine="innodb" comment="Sales Flat Shipment Grid">
  764. <column xsi:type="int" name="entity_id" padding="10" unsigned="true" nullable="false" identity="false"
  765. comment="Entity Id"/>
  766. <column xsi:type="varchar" name="increment_id" nullable="true" length="50" comment="Increment Id"/>
  767. <column xsi:type="smallint" name="store_id" padding="5" unsigned="true" nullable="true" identity="false"
  768. comment="Store Id"/>
  769. <column xsi:type="varchar" name="order_increment_id" nullable="false" length="32" comment="Order Increment Id"/>
  770. <column xsi:type="int" name="order_id" padding="10" unsigned="true" nullable="false" identity="false"
  771. comment="Order Id"/>
  772. <column xsi:type="timestamp" name="order_created_at" on_update="true" nullable="false"
  773. default="CURRENT_TIMESTAMP" comment="Order Increment Id"/>
  774. <column xsi:type="varchar" name="customer_name" nullable="false" length="128" comment="Customer Name"/>
  775. <column xsi:type="decimal" name="total_qty" scale="4" precision="12" unsigned="false" nullable="true"
  776. comment="Total Qty"/>
  777. <column xsi:type="int" name="shipment_status" padding="11" unsigned="false" nullable="true" identity="false"
  778. comment="Shipment Status"/>
  779. <column xsi:type="varchar" name="order_status" nullable="true" length="32" comment="Order"/>
  780. <column xsi:type="varchar" name="billing_address" nullable="true" length="255" comment="Billing Address"/>
  781. <column xsi:type="varchar" name="shipping_address" nullable="true" length="255" comment="Shipping Address"/>
  782. <column xsi:type="varchar" name="billing_name" nullable="true" length="128" comment="Billing Name"/>
  783. <column xsi:type="varchar" name="shipping_name" nullable="true" length="128" comment="Shipping Name"/>
  784. <column xsi:type="varchar" name="customer_email" nullable="true" length="128" comment="Customer Email"/>
  785. <column xsi:type="int" name="customer_group_id" padding="11" unsigned="false" nullable="true" identity="false"/>
  786. <column xsi:type="varchar" name="payment_method" nullable="true" length="32" comment="Payment Method"/>
  787. <column xsi:type="varchar" name="shipping_information" nullable="true" length="255"
  788. comment="Shipping Method Name"/>
  789. <column xsi:type="timestamp" name="created_at" on_update="false" nullable="true" comment="Created At"/>
  790. <column xsi:type="timestamp" name="updated_at" on_update="false" nullable="true" comment="Updated At"/>
  791. <constraint xsi:type="primary" referenceId="PRIMARY">
  792. <column name="entity_id"/>
  793. </constraint>
  794. <constraint xsi:type="unique" referenceId="SALES_SHIPMENT_GRID_INCREMENT_ID_STORE_ID">
  795. <column name="increment_id"/>
  796. <column name="store_id"/>
  797. </constraint>
  798. <index referenceId="SALES_SHIPMENT_GRID_STORE_ID" indexType="btree">
  799. <column name="store_id"/>
  800. </index>
  801. <index referenceId="SALES_SHIPMENT_GRID_TOTAL_QTY" indexType="btree">
  802. <column name="total_qty"/>
  803. </index>
  804. <index referenceId="SALES_SHIPMENT_GRID_ORDER_INCREMENT_ID" indexType="btree">
  805. <column name="order_increment_id"/>
  806. </index>
  807. <index referenceId="SALES_SHIPMENT_GRID_SHIPMENT_STATUS" indexType="btree">
  808. <column name="shipment_status"/>
  809. </index>
  810. <index referenceId="SALES_SHIPMENT_GRID_ORDER_STATUS" indexType="btree">
  811. <column name="order_status"/>
  812. </index>
  813. <index referenceId="SALES_SHIPMENT_GRID_CREATED_AT" indexType="btree">
  814. <column name="created_at"/>
  815. </index>
  816. <index referenceId="SALES_SHIPMENT_GRID_UPDATED_AT" indexType="btree">
  817. <column name="updated_at"/>
  818. </index>
  819. <index referenceId="SALES_SHIPMENT_GRID_ORDER_CREATED_AT" indexType="btree">
  820. <column name="order_created_at"/>
  821. </index>
  822. <index referenceId="SALES_SHIPMENT_GRID_SHIPPING_NAME" indexType="btree">
  823. <column name="shipping_name"/>
  824. </index>
  825. <index referenceId="SALES_SHIPMENT_GRID_BILLING_NAME" indexType="btree">
  826. <column name="billing_name"/>
  827. </index>
  828. <index referenceId="FTI_086B40C8955F167B8EA76653437879B4" indexType="fulltext">
  829. <column name="increment_id"/>
  830. <column name="order_increment_id"/>
  831. <column name="shipping_name"/>
  832. <column name="customer_name"/>
  833. <column name="customer_email"/>
  834. <column name="billing_address"/>
  835. <column name="shipping_address"/>
  836. </index>
  837. </table>
  838. <table name="sales_shipment_item" resource="sales" engine="innodb" comment="Sales Flat Shipment Item">
  839. <column xsi:type="int" name="entity_id" padding="10" unsigned="true" nullable="false" identity="true"
  840. comment="Entity Id"/>
  841. <column xsi:type="int" name="parent_id" padding="10" unsigned="true" nullable="false" identity="false"
  842. comment="Parent Id"/>
  843. <column xsi:type="decimal" name="row_total" scale="4" precision="20" unsigned="false" nullable="true"
  844. comment="Row Total"/>
  845. <column xsi:type="decimal" name="price" scale="4" precision="20" unsigned="false" nullable="true"
  846. comment="Price"/>
  847. <column xsi:type="decimal" name="weight" scale="4" precision="12" unsigned="false" nullable="true"
  848. comment="Weight"/>
  849. <column xsi:type="decimal" name="qty" scale="4" precision="12" unsigned="false" nullable="true" comment="Qty"/>
  850. <column xsi:type="int" name="product_id" padding="11" unsigned="false" nullable="true" identity="false"
  851. comment="Product Id"/>
  852. <column xsi:type="int" name="order_item_id" padding="11" unsigned="false" nullable="true" identity="false"
  853. comment="Order Item Id"/>
  854. <column xsi:type="text" name="additional_data" nullable="true" comment="Additional Data"/>
  855. <column xsi:type="text" name="description" nullable="true" comment="Description"/>
  856. <column xsi:type="varchar" name="name" nullable="true" length="255" comment="Name"/>
  857. <column xsi:type="varchar" name="sku" nullable="true" length="255" comment="Sku"/>
  858. <constraint xsi:type="primary" referenceId="PRIMARY">
  859. <column name="entity_id"/>
  860. </constraint>
  861. <constraint xsi:type="foreign" referenceId="SALES_SHIPMENT_ITEM_PARENT_ID_SALES_SHIPMENT_ENTITY_ID"
  862. table="sales_shipment_item" column="parent_id" referenceTable="sales_shipment"
  863. referenceColumn="entity_id" onDelete="CASCADE"/>
  864. <index referenceId="SALES_SHIPMENT_ITEM_PARENT_ID" indexType="btree">
  865. <column name="parent_id"/>
  866. </index>
  867. </table>
  868. <table name="sales_shipment_track" resource="sales" engine="innodb" comment="Sales Flat Shipment Track">
  869. <column xsi:type="int" name="entity_id" padding="10" unsigned="true" nullable="false" identity="true"
  870. comment="Entity Id"/>
  871. <column xsi:type="int" name="parent_id" padding="10" unsigned="true" nullable="false" identity="false"
  872. comment="Parent Id"/>
  873. <column xsi:type="decimal" name="weight" scale="4" precision="12" unsigned="false" nullable="true"
  874. comment="Weight"/>
  875. <column xsi:type="decimal" name="qty" scale="4" precision="12" unsigned="false" nullable="true" comment="Qty"/>
  876. <column xsi:type="int" name="order_id" padding="10" unsigned="true" nullable="false" identity="false"
  877. comment="Order Id"/>
  878. <column xsi:type="text" name="track_number" nullable="true" comment="Number"/>
  879. <column xsi:type="text" name="description" nullable="true" comment="Description"/>
  880. <column xsi:type="varchar" name="title" nullable="true" length="255" comment="Title"/>
  881. <column xsi:type="varchar" name="carrier_code" nullable="true" length="32" comment="Carrier Code"/>
  882. <column xsi:type="timestamp" name="created_at" on_update="false" nullable="false" default="CURRENT_TIMESTAMP"
  883. comment="Created At"/>
  884. <column xsi:type="timestamp" name="updated_at" on_update="true" nullable="false" default="CURRENT_TIMESTAMP"
  885. comment="Updated At"/>
  886. <constraint xsi:type="primary" referenceId="PRIMARY">
  887. <column name="entity_id"/>
  888. </constraint>
  889. <constraint xsi:type="foreign" referenceId="SALES_SHIPMENT_TRACK_PARENT_ID_SALES_SHIPMENT_ENTITY_ID"
  890. table="sales_shipment_track" column="parent_id" referenceTable="sales_shipment"
  891. referenceColumn="entity_id" onDelete="CASCADE"/>
  892. <index referenceId="SALES_SHIPMENT_TRACK_PARENT_ID" indexType="btree">
  893. <column name="parent_id"/>
  894. </index>
  895. <index referenceId="SALES_SHIPMENT_TRACK_ORDER_ID" indexType="btree">
  896. <column name="order_id"/>
  897. </index>
  898. <index referenceId="SALES_SHIPMENT_TRACK_CREATED_AT" indexType="btree">
  899. <column name="created_at"/>
  900. </index>
  901. </table>
  902. <table name="sales_shipment_comment" resource="sales" engine="innodb" comment="Sales Flat Shipment Comment">
  903. <column xsi:type="int" name="entity_id" padding="10" unsigned="true" nullable="false" identity="true"
  904. comment="Entity Id"/>
  905. <column xsi:type="int" name="parent_id" padding="10" unsigned="true" nullable="false" identity="false"
  906. comment="Parent Id"/>
  907. <column xsi:type="int" name="is_customer_notified" padding="11" unsigned="false" nullable="true"
  908. identity="false" comment="Is Customer Notified"/>
  909. <column xsi:type="smallint" name="is_visible_on_front" padding="5" unsigned="true" nullable="false"
  910. identity="false" default="0" comment="Is Visible On Front"/>
  911. <column xsi:type="text" name="comment" nullable="true" comment="Comment"/>
  912. <column xsi:type="timestamp" name="created_at" on_update="false" nullable="false" default="CURRENT_TIMESTAMP"
  913. comment="Created At"/>
  914. <constraint xsi:type="primary" referenceId="PRIMARY">
  915. <column name="entity_id"/>
  916. </constraint>
  917. <constraint xsi:type="foreign" referenceId="SALES_SHIPMENT_COMMENT_PARENT_ID_SALES_SHIPMENT_ENTITY_ID"
  918. table="sales_shipment_comment" column="parent_id" referenceTable="sales_shipment"
  919. referenceColumn="entity_id" onDelete="CASCADE"/>
  920. <index referenceId="SALES_SHIPMENT_COMMENT_CREATED_AT" indexType="btree">
  921. <column name="created_at"/>
  922. </index>
  923. <index referenceId="SALES_SHIPMENT_COMMENT_PARENT_ID" indexType="btree">
  924. <column name="parent_id"/>
  925. </index>
  926. </table>
  927. <table name="sales_invoice" resource="sales" engine="innodb" comment="Sales Flat Invoice">
  928. <column xsi:type="int" name="entity_id" padding="10" unsigned="true" nullable="false" identity="true"
  929. comment="Entity Id"/>
  930. <column xsi:type="smallint" name="store_id" padding="5" unsigned="true" nullable="true" identity="false"
  931. comment="Store Id"/>
  932. <column xsi:type="decimal" name="base_grand_total" scale="4" precision="20" unsigned="false" nullable="true"
  933. comment="Base Grand Total"/>
  934. <column xsi:type="decimal" name="shipping_tax_amount" scale="4" precision="20" unsigned="false" nullable="true"
  935. comment="Shipping Tax Amount"/>
  936. <column xsi:type="decimal" name="tax_amount" scale="4" precision="20" unsigned="false" nullable="true"
  937. comment="Tax Amount"/>
  938. <column xsi:type="decimal" name="base_tax_amount" scale="4" precision="20" unsigned="false" nullable="true"
  939. comment="Base Tax Amount"/>
  940. <column xsi:type="decimal" name="store_to_order_rate" scale="4" precision="20" unsigned="false" nullable="true"
  941. comment="Store To Order Rate"/>
  942. <column xsi:type="decimal" name="base_shipping_tax_amount" scale="4" precision="20" unsigned="false"
  943. nullable="true" comment="Base Shipping Tax Amount"/>
  944. <column xsi:type="decimal" name="base_discount_amount" scale="4" precision="20" unsigned="false"
  945. nullable="true" comment="Base Discount Amount"/>
  946. <column xsi:type="decimal" name="base_to_order_rate" scale="4" precision="20" unsigned="false" nullable="true"
  947. comment="Base To Order Rate"/>
  948. <column xsi:type="decimal" name="grand_total" scale="4" precision="20" unsigned="false" nullable="true"
  949. comment="Grand Total"/>
  950. <column xsi:type="decimal" name="shipping_amount" scale="4" precision="20" unsigned="false" nullable="true"
  951. comment="Shipping Amount"/>
  952. <column xsi:type="decimal" name="subtotal_incl_tax" scale="4" precision="20" unsigned="false" nullable="true"
  953. comment="Subtotal Incl Tax"/>
  954. <column xsi:type="decimal" name="base_subtotal_incl_tax" scale="4" precision="20" unsigned="false"
  955. nullable="true" comment="Base Subtotal Incl Tax"/>
  956. <column xsi:type="decimal" name="store_to_base_rate" scale="4" precision="20" unsigned="false" nullable="true"
  957. comment="Store To Base Rate"/>
  958. <column xsi:type="decimal" name="base_shipping_amount" scale="4" precision="20" unsigned="false"
  959. nullable="true" comment="Base Shipping Amount"/>
  960. <column xsi:type="decimal" name="total_qty" scale="4" precision="12" unsigned="false" nullable="true"
  961. comment="Total Qty"/>
  962. <column xsi:type="decimal" name="base_to_global_rate" scale="4" precision="20" unsigned="false" nullable="true"
  963. comment="Base To Global Rate"/>
  964. <column xsi:type="decimal" name="subtotal" scale="4" precision="20" unsigned="false" nullable="true"
  965. comment="Subtotal"/>
  966. <column xsi:type="decimal" name="base_subtotal" scale="4" precision="20" unsigned="false" nullable="true"
  967. comment="Base Subtotal"/>
  968. <column xsi:type="decimal" name="discount_amount" scale="4" precision="20" unsigned="false" nullable="true"
  969. comment="Discount Amount"/>
  970. <column xsi:type="int" name="billing_address_id" padding="11" unsigned="false" nullable="true" identity="false"
  971. comment="Billing Address Id"/>
  972. <column xsi:type="smallint" name="is_used_for_refund" padding="5" unsigned="true" nullable="true"
  973. identity="false" comment="Is Used For Refund"/>
  974. <column xsi:type="int" name="order_id" padding="10" unsigned="true" nullable="false" identity="false"
  975. comment="Order Id"/>
  976. <column xsi:type="smallint" name="email_sent" padding="5" unsigned="true" nullable="true" identity="false"
  977. comment="Email Sent"/>
  978. <column xsi:type="smallint" name="send_email" padding="5" unsigned="true" nullable="true" identity="false"
  979. comment="Send Email"/>
  980. <column xsi:type="smallint" name="can_void_flag" padding="5" unsigned="true" nullable="true" identity="false"
  981. comment="Can Void Flag"/>
  982. <column xsi:type="int" name="state" padding="11" unsigned="false" nullable="true" identity="false"
  983. comment="State"/>
  984. <column xsi:type="int" name="shipping_address_id" padding="11" unsigned="false" nullable="true" identity="false"
  985. comment="Shipping Address Id"/>
  986. <column xsi:type="varchar" name="store_currency_code" nullable="true" length="3" comment="Store Currency Code"/>
  987. <column xsi:type="varchar" name="transaction_id" nullable="true" length="255" comment="Transaction Id"/>
  988. <column xsi:type="varchar" name="order_currency_code" nullable="true" length="3" comment="Order Currency Code"/>
  989. <column xsi:type="varchar" name="base_currency_code" nullable="true" length="3" comment="Base Currency Code"/>
  990. <column xsi:type="varchar" name="global_currency_code" nullable="true" length="3"
  991. comment="Global Currency Code"/>
  992. <column xsi:type="varchar" name="increment_id" nullable="true" length="50" comment="Increment Id"/>
  993. <column xsi:type="timestamp" name="created_at" on_update="false" nullable="false" default="CURRENT_TIMESTAMP"
  994. comment="Created At"/>
  995. <column xsi:type="timestamp" name="updated_at" on_update="true" nullable="false" default="CURRENT_TIMESTAMP"
  996. comment="Updated At"/>
  997. <column xsi:type="decimal" name="discount_tax_compensation_amount" scale="4" precision="20" unsigned="false"
  998. nullable="true" comment="Discount Tax Compensation Amount"/>
  999. <column xsi:type="decimal" name="base_discount_tax_compensation_amount" scale="4" precision="20"
  1000. unsigned="false" nullable="true" comment="Base Discount Tax Compensation Amount"/>
  1001. <column xsi:type="decimal" name="shipping_discount_tax_compensation_amount" scale="4" precision="20"
  1002. unsigned="false" nullable="true" comment="Shipping Discount Tax Compensation Amount"/>
  1003. <column xsi:type="decimal" name="base_shipping_discount_tax_compensation_amnt" scale="4" precision="20"
  1004. unsigned="false" nullable="true" comment="Base Shipping Discount Tax Compensation Amount"/>
  1005. <column xsi:type="decimal" name="shipping_incl_tax" scale="4" precision="20" unsigned="false" nullable="true"
  1006. comment="Shipping Incl Tax"/>
  1007. <column xsi:type="decimal" name="base_shipping_incl_tax" scale="4" precision="20" unsigned="false"
  1008. nullable="true" comment="Base Shipping Incl Tax"/>
  1009. <column xsi:type="decimal" name="base_total_refunded" scale="4" precision="20" unsigned="false" nullable="true"
  1010. comment="Base Total Refunded"/>
  1011. <column xsi:type="varchar" name="discount_description" nullable="true" length="255"
  1012. comment="Discount Description"/>
  1013. <column xsi:type="text" name="customer_note" nullable="true" comment="Customer Note"/>
  1014. <column xsi:type="smallint" name="customer_note_notify" padding="5" unsigned="true" nullable="true"
  1015. identity="false" comment="Customer Note Notify"/>
  1016. <constraint xsi:type="primary" referenceId="PRIMARY">
  1017. <column name="entity_id"/>
  1018. </constraint>
  1019. <constraint xsi:type="foreign" referenceId="SALES_INVOICE_ORDER_ID_SALES_ORDER_ENTITY_ID" table="sales_invoice"
  1020. column="order_id" referenceTable="sales_order" referenceColumn="entity_id" onDelete="CASCADE"/>
  1021. <constraint xsi:type="foreign" referenceId="SALES_INVOICE_STORE_ID_STORE_STORE_ID" table="sales_invoice"
  1022. column="store_id" referenceTable="store" referenceColumn="store_id" onDelete="SET NULL"/>
  1023. <constraint xsi:type="unique" referenceId="SALES_INVOICE_INCREMENT_ID_STORE_ID">
  1024. <column name="increment_id"/>
  1025. <column name="store_id"/>
  1026. </constraint>
  1027. <index referenceId="SALES_INVOICE_STORE_ID" indexType="btree">
  1028. <column name="store_id"/>
  1029. </index>
  1030. <index referenceId="SALES_INVOICE_GRAND_TOTAL" indexType="btree">
  1031. <column name="grand_total"/>
  1032. </index>
  1033. <index referenceId="SALES_INVOICE_ORDER_ID" indexType="btree">
  1034. <column name="order_id"/>
  1035. </index>
  1036. <index referenceId="SALES_INVOICE_STATE" indexType="btree">
  1037. <column name="state"/>
  1038. </index>
  1039. <index referenceId="SALES_INVOICE_CREATED_AT" indexType="btree">
  1040. <column name="created_at"/>
  1041. </index>
  1042. <index referenceId="SALES_INVOICE_UPDATED_AT" indexType="btree">
  1043. <column name="updated_at"/>
  1044. </index>
  1045. <index referenceId="SALES_INVOICE_SEND_EMAIL" indexType="btree">
  1046. <column name="send_email"/>
  1047. </index>
  1048. <index referenceId="SALES_INVOICE_EMAIL_SENT" indexType="btree">
  1049. <column name="email_sent"/>
  1050. </index>
  1051. </table>
  1052. <table name="sales_invoice_grid" resource="sales" engine="innodb" comment="Sales Flat Invoice Grid">
  1053. <column xsi:type="int" name="entity_id" padding="10" unsigned="true" nullable="false" identity="false"
  1054. comment="Entity Id"/>
  1055. <column xsi:type="varchar" name="increment_id" nullable="true" length="50" comment="Increment Id"/>
  1056. <column xsi:type="int" name="state" padding="11" unsigned="false" nullable="true" identity="false"
  1057. comment="State"/>
  1058. <column xsi:type="smallint" name="store_id" padding="5" unsigned="true" nullable="true" identity="false"
  1059. comment="Store Id"/>
  1060. <column xsi:type="varchar" name="store_name" nullable="true" length="255" comment="Store Name"/>
  1061. <column xsi:type="int" name="order_id" padding="10" unsigned="true" nullable="false" identity="false"
  1062. comment="Order Id"/>
  1063. <column xsi:type="varchar" name="order_increment_id" nullable="true" length="50" comment="Order Increment Id"/>
  1064. <column xsi:type="timestamp" name="order_created_at" on_update="false" nullable="true"
  1065. comment="Order Created At"/>
  1066. <column xsi:type="varchar" name="customer_name" nullable="true" length="255" comment="Customer Name"/>
  1067. <column xsi:type="varchar" name="customer_email" nullable="true" length="255" comment="Customer Email"/>
  1068. <column xsi:type="int" name="customer_group_id" padding="11" unsigned="false" nullable="true" identity="false"/>
  1069. <column xsi:type="varchar" name="payment_method" nullable="true" length="128" comment="Payment Method"/>
  1070. <column xsi:type="varchar" name="store_currency_code" nullable="true" length="3" comment="Store Currency Code"/>
  1071. <column xsi:type="varchar" name="order_currency_code" nullable="true" length="3" comment="Order Currency Code"/>
  1072. <column xsi:type="varchar" name="base_currency_code" nullable="true" length="3" comment="Base Currency Code"/>
  1073. <column xsi:type="varchar" name="global_currency_code" nullable="true" length="3"
  1074. comment="Global Currency Code"/>
  1075. <column xsi:type="varchar" name="billing_name" nullable="true" length="255" comment="Billing Name"/>
  1076. <column xsi:type="varchar" name="billing_address" nullable="true" length="255" comment="Billing Address"/>
  1077. <column xsi:type="varchar" name="shipping_address" nullable="true" length="255" comment="Shipping Address"/>
  1078. <column xsi:type="varchar" name="shipping_information" nullable="true" length="255"
  1079. comment="Shipping Method Name"/>
  1080. <column xsi:type="decimal" name="subtotal" scale="4" precision="20" unsigned="false" nullable="true"
  1081. comment="Subtotal"/>
  1082. <column xsi:type="decimal" name="shipping_and_handling" scale="4" precision="20" unsigned="false"
  1083. nullable="true" comment="Shipping and handling amount"/>
  1084. <column xsi:type="decimal" name="grand_total" scale="4" precision="20" unsigned="false" nullable="true"
  1085. comment="Grand Total"/>
  1086. <column xsi:type="timestamp" name="created_at" on_update="false" nullable="true" comment="Created At"/>
  1087. <column xsi:type="timestamp" name="updated_at" on_update="false" nullable="true" comment="Updated At"/>
  1088. <column xsi:type="decimal" name="base_grand_total" scale="4" precision="20" unsigned="false" nullable="true"
  1089. comment="Base Grand Total"/>
  1090. <constraint xsi:type="primary" referenceId="PRIMARY">
  1091. <column name="entity_id"/>
  1092. </constraint>
  1093. <constraint xsi:type="unique" referenceId="SALES_INVOICE_GRID_INCREMENT_ID_STORE_ID">
  1094. <column name="increment_id"/>
  1095. <column name="store_id"/>
  1096. </constraint>
  1097. <index referenceId="SALES_INVOICE_GRID_STORE_ID" indexType="btree">
  1098. <column name="store_id"/>
  1099. </index>
  1100. <index referenceId="SALES_INVOICE_GRID_GRAND_TOTAL" indexType="btree">
  1101. <column name="grand_total"/>
  1102. </index>
  1103. <index referenceId="SALES_INVOICE_GRID_ORDER_ID" indexType="btree">
  1104. <column name="order_id"/>
  1105. </index>
  1106. <index referenceId="SALES_INVOICE_GRID_STATE" indexType="btree">
  1107. <column name="state"/>
  1108. </index>
  1109. <index referenceId="SALES_INVOICE_GRID_ORDER_INCREMENT_ID" indexType="btree">
  1110. <column name="order_increment_id"/>
  1111. </index>
  1112. <index referenceId="SALES_INVOICE_GRID_CREATED_AT" indexType="btree">
  1113. <column name="created_at"/>
  1114. </index>
  1115. <index referenceId="SALES_INVOICE_GRID_UPDATED_AT" indexType="btree">
  1116. <column name="updated_at"/>
  1117. </index>
  1118. <index referenceId="SALES_INVOICE_GRID_ORDER_CREATED_AT" indexType="btree">
  1119. <column name="order_created_at"/>
  1120. </index>
  1121. <index referenceId="SALES_INVOICE_GRID_BILLING_NAME" indexType="btree">
  1122. <column name="billing_name"/>
  1123. </index>
  1124. <index referenceId="FTI_95D9C924DD6A8734EB8B5D01D60F90DE" indexType="fulltext">
  1125. <column name="increment_id"/>
  1126. <column name="order_increment_id"/>
  1127. <column name="billing_name"/>
  1128. <column name="billing_address"/>
  1129. <column name="shipping_address"/>
  1130. <column name="customer_name"/>
  1131. <column name="customer_email"/>
  1132. </index>
  1133. <index referenceId="SALES_INVOICE_GRID_BASE_GRAND_TOTAL" indexType="btree">
  1134. <column name="base_grand_total"/>
  1135. </index>
  1136. </table>
  1137. <table name="sales_invoice_item" resource="sales" engine="innodb" comment="Sales Flat Invoice Item">
  1138. <column xsi:type="int" name="entity_id" padding="10" unsigned="true" nullable="false" identity="true"
  1139. comment="Entity Id"/>
  1140. <column xsi:type="int" name="parent_id" padding="10" unsigned="true" nullable="false" identity="false"
  1141. comment="Parent Id"/>
  1142. <column xsi:type="decimal" name="base_price" scale="4" precision="12" unsigned="false" nullable="true"
  1143. comment="Base Price"/>
  1144. <column xsi:type="decimal" name="tax_amount" scale="4" precision="12" unsigned="false" nullable="true"
  1145. comment="Tax Amount"/>
  1146. <column xsi:type="decimal" name="base_row_total" scale="4" precision="20" unsigned="false" nullable="true"
  1147. comment="Base Row Total"/>
  1148. <column xsi:type="decimal" name="discount_amount" scale="4" precision="12" unsigned="false" nullable="true"
  1149. comment="Discount Amount"/>
  1150. <column xsi:type="decimal" name="row_total" scale="4" precision="20" unsigned="false" nullable="true"
  1151. comment="Row Total"/>
  1152. <column xsi:type="decimal" name="base_discount_amount" scale="4" precision="12" unsigned="false"
  1153. nullable="true" comment="Base Discount Amount"/>
  1154. <column xsi:type="decimal" name="price_incl_tax" scale="4" precision="12" unsigned="false" nullable="true"
  1155. comment="Price Incl Tax"/>
  1156. <column xsi:type="decimal" name="base_tax_amount" scale="4" precision="12" unsigned="false" nullable="true"
  1157. comment="Base Tax Amount"/>
  1158. <column xsi:type="decimal" name="base_price_incl_tax" scale="4" precision="12" unsigned="false" nullable="true"
  1159. comment="Base Price Incl Tax"/>
  1160. <column xsi:type="decimal" name="qty" scale="4" precision="12" unsigned="false" nullable="true" comment="Qty"/>
  1161. <column xsi:type="decimal" name="base_cost" scale="4" precision="12" unsigned="false" nullable="true"
  1162. comment="Base Cost"/>
  1163. <column xsi:type="decimal" name="price" scale="4" precision="12" unsigned="false" nullable="true"
  1164. comment="Price"/>
  1165. <column xsi:type="decimal" name="base_row_total_incl_tax" scale="4" precision="12" unsigned="false"
  1166. nullable="true" comment="Base Row Total Incl Tax"/>
  1167. <column xsi:type="decimal" name="row_total_incl_tax" scale="4" precision="12" unsigned="false" nullable="true"
  1168. comment="Row Total Incl Tax"/>
  1169. <column xsi:type="int" name="product_id" padding="11" unsigned="false" nullable="true" identity="false"
  1170. comment="Product Id"/>
  1171. <column xsi:type="int" name="order_item_id" padding="11" unsigned="false" nullable="true" identity="false"
  1172. comment="Order Item Id"/>
  1173. <column xsi:type="text" name="additional_data" nullable="true" comment="Additional Data"/>
  1174. <column xsi:type="text" name="description" nullable="true" comment="Description"/>
  1175. <column xsi:type="varchar" name="sku" nullable="true" length="255" comment="Sku"/>
  1176. <column xsi:type="varchar" name="name" nullable="true" length="255" comment="Name"/>
  1177. <column xsi:type="decimal" name="discount_tax_compensation_amount" scale="4" precision="12" unsigned="false"
  1178. nullable="true" comment="Discount Tax Compensation Amount"/>
  1179. <column xsi:type="decimal" name="base_discount_tax_compensation_amount" scale="4" precision="12"
  1180. unsigned="false" nullable="true" comment="Base Discount Tax Compensation Amount"/>
  1181. <column xsi:type="text" name="tax_ratio" nullable="true"
  1182. comment="Ratio of tax invoiced over tax of the order item"/>
  1183. <constraint xsi:type="primary" referenceId="PRIMARY">
  1184. <column name="entity_id"/>
  1185. </constraint>
  1186. <constraint xsi:type="foreign" referenceId="SALES_INVOICE_ITEM_PARENT_ID_SALES_INVOICE_ENTITY_ID"
  1187. table="sales_invoice_item" column="parent_id" referenceTable="sales_invoice"
  1188. referenceColumn="entity_id" onDelete="CASCADE"/>
  1189. <index referenceId="SALES_INVOICE_ITEM_PARENT_ID" indexType="btree">
  1190. <column name="parent_id"/>
  1191. </index>
  1192. </table>
  1193. <table name="sales_invoice_comment" resource="sales" engine="innodb" comment="Sales Flat Invoice Comment">
  1194. <column xsi:type="int" name="entity_id" padding="10" unsigned="true" nullable="false" identity="true"
  1195. comment="Entity Id"/>
  1196. <column xsi:type="int" name="parent_id" padding="10" unsigned="true" nullable="false" identity="false"
  1197. comment="Parent Id"/>
  1198. <column xsi:type="smallint" name="is_customer_notified" padding="5" unsigned="true" nullable="true"
  1199. identity="false" comment="Is Customer Notified"/>
  1200. <column xsi:type="smallint" name="is_visible_on_front" padding="5" unsigned="true" nullable="false"
  1201. identity="false" default="0" comment="Is Visible On Front"/>
  1202. <column xsi:type="text" name="comment" nullable="true" comment="Comment"/>
  1203. <column xsi:type="timestamp" name="created_at" on_update="false" nullable="false" default="CURRENT_TIMESTAMP"
  1204. comment="Created At"/>
  1205. <constraint xsi:type="primary" referenceId="PRIMARY">
  1206. <column name="entity_id"/>
  1207. </constraint>
  1208. <constraint xsi:type="foreign" referenceId="SALES_INVOICE_COMMENT_PARENT_ID_SALES_INVOICE_ENTITY_ID"
  1209. table="sales_invoice_comment" column="parent_id" referenceTable="sales_invoice"
  1210. referenceColumn="entity_id" onDelete="CASCADE"/>
  1211. <index referenceId="SALES_INVOICE_COMMENT_CREATED_AT" indexType="btree">
  1212. <column name="created_at"/>
  1213. </index>
  1214. <index referenceId="SALES_INVOICE_COMMENT_PARENT_ID" indexType="btree">
  1215. <column name="parent_id"/>
  1216. </index>
  1217. </table>
  1218. <table name="sales_creditmemo" resource="sales" engine="innodb" comment="Sales Flat Creditmemo">
  1219. <column xsi:type="int" name="entity_id" padding="10" unsigned="true" nullable="false" identity="true"
  1220. comment="Entity Id"/>
  1221. <column xsi:type="smallint" name="store_id" padding="5" unsigned="true" nullable="true" identity="false"
  1222. comment="Store Id"/>
  1223. <column xsi:type="decimal" name="adjustment_positive" scale="4" precision="20" unsigned="false" nullable="true"
  1224. comment="Adjustment Positive"/>
  1225. <column xsi:type="decimal" name="base_shipping_tax_amount" scale="4" precision="20" unsigned="false"
  1226. nullable="true" comment="Base Shipping Tax Amount"/>
  1227. <column xsi:type="decimal" name="store_to_order_rate" scale="4" precision="20" unsigned="false" nullable="true"
  1228. comment="Store To Order Rate"/>
  1229. <column xsi:type="decimal" name="base_discount_amount" scale="4" precision="20" unsigned="false"
  1230. nullable="true" comment="Base Discount Amount"/>
  1231. <column xsi:type="decimal" name="base_to_order_rate" scale="4" precision="20" unsigned="false" nullable="true"
  1232. comment="Base To Order Rate"/>
  1233. <column xsi:type="decimal" name="grand_total" scale="4" precision="20" unsigned="false" nullable="true"
  1234. comment="Grand Total"/>
  1235. <column xsi:type="decimal" name="base_adjustment_negative" scale="4" precision="20" unsigned="false"
  1236. nullable="true" comment="Base Adjustment Negative"/>
  1237. <column xsi:type="decimal" name="base_subtotal_incl_tax" scale="4" precision="20" unsigned="false"
  1238. nullable="true" comment="Base Subtotal Incl Tax"/>
  1239. <column xsi:type="decimal" name="shipping_amount" scale="4" precision="20" unsigned="false" nullable="true"
  1240. comment="Shipping Amount"/>
  1241. <column xsi:type="decimal" name="subtotal_incl_tax" scale="4" precision="20" unsigned="false" nullable="true"
  1242. comment="Subtotal Incl Tax"/>
  1243. <column xsi:type="decimal" name="adjustment_negative" scale="4" precision="20" unsigned="false" nullable="true"
  1244. comment="Adjustment Negative"/>
  1245. <column xsi:type="decimal" name="base_shipping_amount" scale="4" precision="20" unsigned="false"
  1246. nullable="true" comment="Base Shipping Amount"/>
  1247. <column xsi:type="decimal" name="store_to_base_rate" scale="4" precision="20" unsigned="false" nullable="true"
  1248. comment="Store To Base Rate"/>
  1249. <column xsi:type="decimal" name="base_to_global_rate" scale="4" precision="20" unsigned="false" nullable="true"
  1250. comment="Base To Global Rate"/>
  1251. <column xsi:type="decimal" name="base_adjustment" scale="4" precision="20" unsigned="false" nullable="true"
  1252. comment="Base Adjustment"/>
  1253. <column xsi:type="decimal" name="base_subtotal" scale="4" precision="20" unsigned="false" nullable="true"
  1254. comment="Base Subtotal"/>
  1255. <column xsi:type="decimal" name="discount_amount" scale="4" precision="20" unsigned="false" nullable="true"
  1256. comment="Discount Amount"/>
  1257. <column xsi:type="decimal" name="subtotal" scale="4" precision="20" unsigned="false" nullable="true"
  1258. comment="Subtotal"/>
  1259. <column xsi:type="decimal" name="adjustment" scale="4" precision="20" unsigned="false" nullable="true"
  1260. comment="Adjustment"/>
  1261. <column xsi:type="decimal" name="base_grand_total" scale="4" precision="20" unsigned="false" nullable="true"
  1262. comment="Base Grand Total"/>
  1263. <column xsi:type="decimal" name="base_adjustment_positive" scale="4" precision="20" unsigned="false"
  1264. nullable="true" comment="Base Adjustment Positive"/>
  1265. <column xsi:type="decimal" name="base_tax_amount" scale="4" precision="20" unsigned="false" nullable="true"
  1266. comment="Base Tax Amount"/>
  1267. <column xsi:type="decimal" name="shipping_tax_amount" scale="4" precision="20" unsigned="false" nullable="true"
  1268. comment="Shipping Tax Amount"/>
  1269. <column xsi:type="decimal" name="tax_amount" scale="4" precision="20" unsigned="false" nullable="true"
  1270. comment="Tax Amount"/>
  1271. <column xsi:type="int" name="order_id" padding="10" unsigned="true" nullable="false" identity="false"
  1272. comment="Order Id"/>
  1273. <column xsi:type="smallint" name="email_sent" padding="5" unsigned="true" nullable="true" identity="false"
  1274. comment="Email Sent"/>
  1275. <column xsi:type="smallint" name="send_email" padding="5" unsigned="true" nullable="true" identity="false"
  1276. comment="Send Email"/>
  1277. <column xsi:type="int" name="creditmemo_status" padding="11" unsigned="false" nullable="true" identity="false"
  1278. comment="Creditmemo Status"/>
  1279. <column xsi:type="int" name="state" padding="11" unsigned="false" nullable="true" identity="false"
  1280. comment="State"/>
  1281. <column xsi:type="int" name="shipping_address_id" padding="11" unsigned="false" nullable="true" identity="false"
  1282. comment="Shipping Address Id"/>
  1283. <column xsi:type="int" name="billing_address_id" padding="11" unsigned="false" nullable="true" identity="false"
  1284. comment="Billing Address Id"/>
  1285. <column xsi:type="int" name="invoice_id" padding="11" unsigned="false" nullable="true" identity="false"
  1286. comment="Invoice Id"/>
  1287. <column xsi:type="varchar" name="store_currency_code" nullable="true" length="3" comment="Store Currency Code"/>
  1288. <column xsi:type="varchar" name="order_currency_code" nullable="true" length="3" comment="Order Currency Code"/>
  1289. <column xsi:type="varchar" name="base_currency_code" nullable="true" length="3" comment="Base Currency Code"/>
  1290. <column xsi:type="varchar" name="global_currency_code" nullable="true" length="3"
  1291. comment="Global Currency Code"/>
  1292. <column xsi:type="varchar" name="transaction_id" nullable="true" length="255" comment="Transaction Id"/>
  1293. <column xsi:type="varchar" name="increment_id" nullable="true" length="50" comment="Increment Id"/>
  1294. <column xsi:type="timestamp" name="created_at" on_update="false" nullable="false" default="CURRENT_TIMESTAMP"
  1295. comment="Created At"/>
  1296. <column xsi:type="timestamp" name="updated_at" on_update="true" nullable="false" default="CURRENT_TIMESTAMP"
  1297. comment="Updated At"/>
  1298. <column xsi:type="decimal" name="discount_tax_compensation_amount" scale="4" precision="20" unsigned="false"
  1299. nullable="true" comment="Discount Tax Compensation Amount"/>
  1300. <column xsi:type="decimal" name="base_discount_tax_compensation_amount" scale="4" precision="20"
  1301. unsigned="false" nullable="true" comment="Base Discount Tax Compensation Amount"/>
  1302. <column xsi:type="decimal" name="shipping_discount_tax_compensation_amount" scale="4" precision="20"
  1303. unsigned="false" nullable="true" comment="Shipping Discount Tax Compensation Amount"/>
  1304. <column xsi:type="decimal" name="base_shipping_discount_tax_compensation_amnt" scale="4" precision="20"
  1305. unsigned="false" nullable="true" comment="Base Shipping Discount Tax Compensation Amount"/>
  1306. <column xsi:type="decimal" name="shipping_incl_tax" scale="4" precision="20" unsigned="false" nullable="true"
  1307. comment="Shipping Incl Tax"/>
  1308. <column xsi:type="decimal" name="base_shipping_incl_tax" scale="4" precision="20" unsigned="false"
  1309. nullable="true" comment="Base Shipping Incl Tax"/>
  1310. <column xsi:type="varchar" name="discount_description" nullable="true" length="255"
  1311. comment="Discount Description"/>
  1312. <column xsi:type="text" name="customer_note" nullable="true" comment="Customer Note"/>
  1313. <column xsi:type="smallint" name="customer_note_notify" padding="5" unsigned="true" nullable="true"
  1314. identity="false" comment="Customer Note Notify"/>
  1315. <constraint xsi:type="primary" referenceId="PRIMARY">
  1316. <column name="entity_id"/>
  1317. </constraint>
  1318. <constraint xsi:type="foreign" referenceId="SALES_CREDITMEMO_ORDER_ID_SALES_ORDER_ENTITY_ID" table="sales_creditmemo"
  1319. column="order_id" referenceTable="sales_order" referenceColumn="entity_id" onDelete="CASCADE"/>
  1320. <constraint xsi:type="foreign" referenceId="SALES_CREDITMEMO_STORE_ID_STORE_STORE_ID" table="sales_creditmemo"
  1321. column="store_id" referenceTable="store" referenceColumn="store_id" onDelete="SET NULL"/>
  1322. <constraint xsi:type="unique" referenceId="SALES_CREDITMEMO_INCREMENT_ID_STORE_ID">
  1323. <column name="increment_id"/>
  1324. <column name="store_id"/>
  1325. </constraint>
  1326. <index referenceId="SALES_CREDITMEMO_STORE_ID" indexType="btree">
  1327. <column name="store_id"/>
  1328. </index>
  1329. <index referenceId="SALES_CREDITMEMO_ORDER_ID" indexType="btree">
  1330. <column name="order_id"/>
  1331. </index>
  1332. <index referenceId="SALES_CREDITMEMO_CREDITMEMO_STATUS" indexType="btree">
  1333. <column name="creditmemo_status"/>
  1334. </index>
  1335. <index referenceId="SALES_CREDITMEMO_STATE" indexType="btree">
  1336. <column name="state"/>
  1337. </index>
  1338. <index referenceId="SALES_CREDITMEMO_CREATED_AT" indexType="btree">
  1339. <column name="created_at"/>
  1340. </index>
  1341. <index referenceId="SALES_CREDITMEMO_UPDATED_AT" indexType="btree">
  1342. <column name="updated_at"/>
  1343. </index>
  1344. <index referenceId="SALES_CREDITMEMO_SEND_EMAIL" indexType="btree">
  1345. <column name="send_email"/>
  1346. </index>
  1347. <index referenceId="SALES_CREDITMEMO_EMAIL_SENT" indexType="btree">
  1348. <column name="email_sent"/>
  1349. </index>
  1350. </table>
  1351. <table name="sales_creditmemo_grid" resource="sales" engine="innodb" comment="Sales Flat Creditmemo Grid">
  1352. <column xsi:type="int" name="entity_id" padding="10" unsigned="true" nullable="false" identity="false"
  1353. comment="Entity Id"/>
  1354. <column xsi:type="varchar" name="increment_id" nullable="true" length="50" comment="Increment Id"/>
  1355. <column xsi:type="timestamp" name="created_at" on_update="false" nullable="true" comment="Created At"/>
  1356. <column xsi:type="timestamp" name="updated_at" on_update="false" nullable="true" comment="Updated At"/>
  1357. <column xsi:type="int" name="order_id" padding="10" unsigned="true" nullable="false" identity="false"
  1358. comment="Order Id"/>
  1359. <column xsi:type="varchar" name="order_increment_id" nullable="true" length="50" comment="Order Increment Id"/>
  1360. <column xsi:type="timestamp" name="order_created_at" on_update="false" nullable="true"
  1361. comment="Order Created At"/>
  1362. <column xsi:type="varchar" name="billing_name" nullable="true" length="255" comment="Billing Name"/>
  1363. <column xsi:type="int" name="state" padding="11" unsigned="false" nullable="true" identity="false"
  1364. comment="Status"/>
  1365. <column xsi:type="decimal" name="base_grand_total" scale="4" precision="20" unsigned="false" nullable="true"
  1366. comment="Base Grand Total"/>
  1367. <column xsi:type="varchar" name="order_status" nullable="true" length="32" comment="Order Status"/>
  1368. <column xsi:type="smallint" name="store_id" padding="5" unsigned="true" nullable="true" identity="false"
  1369. comment="Store Id"/>
  1370. <column xsi:type="varchar" name="billing_address" nullable="true" length="255" comment="Billing Address"/>
  1371. <column xsi:type="varchar" name="shipping_address" nullable="true" length="255" comment="Shipping Address"/>
  1372. <column xsi:type="varchar" name="customer_name" nullable="false" length="128" comment="Customer Name"/>
  1373. <column xsi:type="varchar" name="customer_email" nullable="true" length="128" comment="Customer Email"/>
  1374. <column xsi:type="smallint" name="customer_group_id" padding="6" unsigned="false" nullable="true"
  1375. identity="false" comment="Customer Group Id"/>
  1376. <column xsi:type="varchar" name="payment_method" nullable="true" length="32" comment="Payment Method"/>
  1377. <column xsi:type="varchar" name="shipping_information" nullable="true" length="255"
  1378. comment="Shipping Method Name"/>
  1379. <column xsi:type="decimal" name="subtotal" scale="4" precision="20" unsigned="false" nullable="true"
  1380. comment="Subtotal"/>
  1381. <column xsi:type="decimal" name="shipping_and_handling" scale="4" precision="20" unsigned="false"
  1382. nullable="true" comment="Shipping and handling amount"/>
  1383. <column xsi:type="decimal" name="adjustment_positive" scale="4" precision="20" unsigned="false" nullable="true"
  1384. comment="Adjustment Positive"/>
  1385. <column xsi:type="decimal" name="adjustment_negative" scale="4" precision="20" unsigned="false" nullable="true"
  1386. comment="Adjustment Negative"/>
  1387. <column xsi:type="decimal" name="order_base_grand_total" scale="4" precision="20" unsigned="false"
  1388. nullable="true" comment="Order Grand Total"/>
  1389. <constraint xsi:type="primary" referenceId="PRIMARY">
  1390. <column name="entity_id"/>
  1391. </constraint>
  1392. <constraint xsi:type="unique" referenceId="SALES_CREDITMEMO_GRID_INCREMENT_ID_STORE_ID">
  1393. <column name="increment_id"/>
  1394. <column name="store_id"/>
  1395. </constraint>
  1396. <index referenceId="SALES_CREDITMEMO_GRID_ORDER_INCREMENT_ID" indexType="btree">
  1397. <column name="order_increment_id"/>
  1398. </index>
  1399. <index referenceId="SALES_CREDITMEMO_GRID_CREATED_AT" indexType="btree">
  1400. <column name="created_at"/>
  1401. </index>
  1402. <index referenceId="SALES_CREDITMEMO_GRID_UPDATED_AT" indexType="btree">
  1403. <column name="updated_at"/>
  1404. </index>
  1405. <index referenceId="SALES_CREDITMEMO_GRID_ORDER_CREATED_AT" indexType="btree">
  1406. <column name="order_created_at"/>
  1407. </index>
  1408. <index referenceId="SALES_CREDITMEMO_GRID_STATE" indexType="btree">
  1409. <column name="state"/>
  1410. </index>
  1411. <index referenceId="SALES_CREDITMEMO_GRID_BILLING_NAME" indexType="btree">
  1412. <column name="billing_name"/>
  1413. </index>
  1414. <index referenceId="SALES_CREDITMEMO_GRID_ORDER_STATUS" indexType="btree">
  1415. <column name="order_status"/>
  1416. </index>
  1417. <index referenceId="SALES_CREDITMEMO_GRID_BASE_GRAND_TOTAL" indexType="btree">
  1418. <column name="base_grand_total"/>
  1419. </index>
  1420. <index referenceId="SALES_CREDITMEMO_GRID_STORE_ID" indexType="btree">
  1421. <column name="store_id"/>
  1422. </index>
  1423. <index referenceId="SALES_CREDITMEMO_GRID_ORDER_BASE_GRAND_TOTAL" indexType="btree">
  1424. <column name="order_base_grand_total"/>
  1425. </index>
  1426. <index referenceId="SALES_CREDITMEMO_GRID_ORDER_ID" indexType="btree">
  1427. <column name="order_id"/>
  1428. </index>
  1429. <index referenceId="FTI_32B7BA885941A8254EE84AE650ABDC86" indexType="fulltext">
  1430. <column name="increment_id"/>
  1431. <column name="order_increment_id"/>
  1432. <column name="billing_name"/>
  1433. <column name="billing_address"/>
  1434. <column name="shipping_address"/>
  1435. <column name="customer_name"/>
  1436. <column name="customer_email"/>
  1437. </index>
  1438. </table>
  1439. <table name="sales_creditmemo_item" resource="sales" engine="innodb" comment="Sales Flat Creditmemo Item">
  1440. <column xsi:type="int" name="entity_id" padding="10" unsigned="true" nullable="false" identity="true"
  1441. comment="Entity Id"/>
  1442. <column xsi:type="int" name="parent_id" padding="10" unsigned="true" nullable="false" identity="false"
  1443. comment="Parent Id"/>
  1444. <column xsi:type="decimal" name="base_price" scale="4" precision="12" unsigned="false" nullable="true"
  1445. comment="Base Price"/>
  1446. <column xsi:type="decimal" name="tax_amount" scale="4" precision="12" unsigned="false" nullable="true"
  1447. comment="Tax Amount"/>
  1448. <column xsi:type="decimal" name="base_row_total" scale="4" precision="12" unsigned="false" nullable="true"
  1449. comment="Base Row Total"/>
  1450. <column xsi:type="decimal" name="discount_amount" scale="4" precision="12" unsigned="false" nullable="true"
  1451. comment="Discount Amount"/>
  1452. <column xsi:type="decimal" name="row_total" scale="4" precision="12" unsigned="false" nullable="true"
  1453. comment="Row Total"/>
  1454. <column xsi:type="decimal" name="base_discount_amount" scale="4" precision="12" unsigned="false"
  1455. nullable="true" comment="Base Discount Amount"/>
  1456. <column xsi:type="decimal" name="price_incl_tax" scale="4" precision="12" unsigned="false" nullable="true"
  1457. comment="Price Incl Tax"/>
  1458. <column xsi:type="decimal" name="base_tax_amount" scale="4" precision="12" unsigned="false" nullable="true"
  1459. comment="Base Tax Amount"/>
  1460. <column xsi:type="decimal" name="base_price_incl_tax" scale="4" precision="12" unsigned="false" nullable="true"
  1461. comment="Base Price Incl Tax"/>
  1462. <column xsi:type="decimal" name="qty" scale="4" precision="12" unsigned="false" nullable="true" comment="Qty"/>
  1463. <column xsi:type="decimal" name="base_cost" scale="4" precision="12" unsigned="false" nullable="true"
  1464. comment="Base Cost"/>
  1465. <column xsi:type="decimal" name="price" scale="4" precision="12" unsigned="false" nullable="true"
  1466. comment="Price"/>
  1467. <column xsi:type="decimal" name="base_row_total_incl_tax" scale="4" precision="12" unsigned="false"
  1468. nullable="true" comment="Base Row Total Incl Tax"/>
  1469. <column xsi:type="decimal" name="row_total_incl_tax" scale="4" precision="12" unsigned="false" nullable="true"
  1470. comment="Row Total Incl Tax"/>
  1471. <column xsi:type="int" name="product_id" padding="11" unsigned="false" nullable="true" identity="false"
  1472. comment="Product Id"/>
  1473. <column xsi:type="int" name="order_item_id" padding="11" unsigned="false" nullable="true" identity="false"
  1474. comment="Order Item Id"/>
  1475. <column xsi:type="text" name="additional_data" nullable="true" comment="Additional Data"/>
  1476. <column xsi:type="text" name="description" nullable="true" comment="Description"/>
  1477. <column xsi:type="varchar" name="sku" nullable="true" length="255" comment="Sku"/>
  1478. <column xsi:type="varchar" name="name" nullable="true" length="255" comment="Name"/>
  1479. <column xsi:type="decimal" name="discount_tax_compensation_amount" scale="4" precision="12" unsigned="false"
  1480. nullable="true" comment="Discount Tax Compensation Amount"/>
  1481. <column xsi:type="decimal" name="base_discount_tax_compensation_amount" scale="4" precision="12"
  1482. unsigned="false" nullable="true" comment="Base Discount Tax Compensation Amount"/>
  1483. <column xsi:type="text" name="tax_ratio" nullable="true"
  1484. comment="Ratio of tax in the creditmemo item over tax of the order item"/>
  1485. <constraint xsi:type="primary" referenceId="PRIMARY">
  1486. <column name="entity_id"/>
  1487. </constraint>
  1488. <constraint xsi:type="foreign" referenceId="SALES_CREDITMEMO_ITEM_PARENT_ID_SALES_CREDITMEMO_ENTITY_ID"
  1489. table="sales_creditmemo_item" column="parent_id" referenceTable="sales_creditmemo"
  1490. referenceColumn="entity_id" onDelete="CASCADE"/>
  1491. <index referenceId="SALES_CREDITMEMO_ITEM_PARENT_ID" indexType="btree">
  1492. <column name="parent_id"/>
  1493. </index>
  1494. </table>
  1495. <table name="sales_creditmemo_comment" resource="sales" engine="innodb" comment="Sales Flat Creditmemo Comment">
  1496. <column xsi:type="int" name="entity_id" padding="10" unsigned="true" nullable="false" identity="true"
  1497. comment="Entity Id"/>
  1498. <column xsi:type="int" name="parent_id" padding="10" unsigned="true" nullable="false" identity="false"
  1499. comment="Parent Id"/>
  1500. <column xsi:type="int" name="is_customer_notified" padding="11" unsigned="false" nullable="true"
  1501. identity="false" comment="Is Customer Notified"/>
  1502. <column xsi:type="smallint" name="is_visible_on_front" padding="5" unsigned="true" nullable="false"
  1503. identity="false" default="0" comment="Is Visible On Front"/>
  1504. <column xsi:type="text" name="comment" nullable="true" comment="Comment"/>
  1505. <column xsi:type="timestamp" name="created_at" on_update="false" nullable="false" default="CURRENT_TIMESTAMP"
  1506. comment="Created At"/>
  1507. <constraint xsi:type="primary" referenceId="PRIMARY">
  1508. <column name="entity_id"/>
  1509. </constraint>
  1510. <constraint xsi:type="foreign" referenceId="SALES_CREDITMEMO_COMMENT_PARENT_ID_SALES_CREDITMEMO_ENTITY_ID"
  1511. table="sales_creditmemo_comment" column="parent_id" referenceTable="sales_creditmemo"
  1512. referenceColumn="entity_id" onDelete="CASCADE"/>
  1513. <index referenceId="SALES_CREDITMEMO_COMMENT_CREATED_AT" indexType="btree">
  1514. <column name="created_at"/>
  1515. </index>
  1516. <index referenceId="SALES_CREDITMEMO_COMMENT_PARENT_ID" indexType="btree">
  1517. <column name="parent_id"/>
  1518. </index>
  1519. </table>
  1520. <table name="sales_invoiced_aggregated" resource="sales" engine="innodb" comment="Sales Invoiced Aggregated">
  1521. <column xsi:type="int" name="id" padding="10" unsigned="true" nullable="false" identity="true" comment="Id"/>
  1522. <column xsi:type="date" name="period" comment="Period"/>
  1523. <column xsi:type="smallint" name="store_id" padding="5" unsigned="true" nullable="true" identity="false"
  1524. comment="Store Id"/>
  1525. <column xsi:type="varchar" name="order_status" nullable="true" length="50" comment="Order Status"/>
  1526. <column xsi:type="int" name="orders_count" padding="11" unsigned="false" nullable="false" identity="false"
  1527. default="0" comment="Orders Count"/>
  1528. <column xsi:type="decimal" name="orders_invoiced" scale="4" precision="12" unsigned="false" nullable="true"
  1529. comment="Orders Invoiced"/>
  1530. <column xsi:type="decimal" name="invoiced" scale="4" precision="12" unsigned="false" nullable="true"
  1531. comment="Invoiced"/>
  1532. <column xsi:type="decimal" name="invoiced_captured" scale="4" precision="12" unsigned="false" nullable="true"
  1533. comment="Invoiced Captured"/>
  1534. <column xsi:type="decimal" name="invoiced_not_captured" scale="4" precision="12" unsigned="false"
  1535. nullable="true" comment="Invoiced Not Captured"/>
  1536. <constraint xsi:type="primary" referenceId="PRIMARY">
  1537. <column name="id"/>
  1538. </constraint>
  1539. <constraint xsi:type="foreign" referenceId="SALES_INVOICED_AGGREGATED_STORE_ID_STORE_STORE_ID"
  1540. table="sales_invoiced_aggregated" column="store_id" referenceTable="store"
  1541. referenceColumn="store_id" onDelete="SET NULL"/>
  1542. <constraint xsi:type="unique" referenceId="SALES_INVOICED_AGGREGATED_PERIOD_STORE_ID_ORDER_STATUS">
  1543. <column name="period"/>
  1544. <column name="store_id"/>
  1545. <column name="order_status"/>
  1546. </constraint>
  1547. <index referenceId="SALES_INVOICED_AGGREGATED_STORE_ID" indexType="btree">
  1548. <column name="store_id"/>
  1549. </index>
  1550. </table>
  1551. <table name="sales_invoiced_aggregated_order" resource="sales" engine="innodb"
  1552. comment="Sales Invoiced Aggregated Order">
  1553. <column xsi:type="int" name="id" padding="10" unsigned="true" nullable="false" identity="true" comment="Id"/>
  1554. <column xsi:type="date" name="period" comment="Period"/>
  1555. <column xsi:type="smallint" name="store_id" padding="5" unsigned="true" nullable="true" identity="false"
  1556. comment="Store Id"/>
  1557. <column xsi:type="varchar" name="order_status" nullable="false" length="50" comment="Order Status"/>
  1558. <column xsi:type="int" name="orders_count" padding="11" unsigned="false" nullable="false" identity="false"
  1559. default="0" comment="Orders Count"/>
  1560. <column xsi:type="decimal" name="orders_invoiced" scale="4" precision="12" unsigned="false" nullable="true"
  1561. comment="Orders Invoiced"/>
  1562. <column xsi:type="decimal" name="invoiced" scale="4" precision="12" unsigned="false" nullable="true"
  1563. comment="Invoiced"/>
  1564. <column xsi:type="decimal" name="invoiced_captured" scale="4" precision="12" unsigned="false" nullable="true"
  1565. comment="Invoiced Captured"/>
  1566. <column xsi:type="decimal" name="invoiced_not_captured" scale="4" precision="12" unsigned="false"
  1567. nullable="true" comment="Invoiced Not Captured"/>
  1568. <constraint xsi:type="primary" referenceId="PRIMARY">
  1569. <column name="id"/>
  1570. </constraint>
  1571. <constraint xsi:type="foreign" referenceId="SALES_INVOICED_AGGREGATED_ORDER_STORE_ID_STORE_STORE_ID"
  1572. table="sales_invoiced_aggregated_order" column="store_id" referenceTable="store"
  1573. referenceColumn="store_id" onDelete="SET NULL"/>
  1574. <constraint xsi:type="unique" referenceId="SALES_INVOICED_AGGREGATED_ORDER_PERIOD_STORE_ID_ORDER_STATUS">
  1575. <column name="period"/>
  1576. <column name="store_id"/>
  1577. <column name="order_status"/>
  1578. </constraint>
  1579. <index referenceId="SALES_INVOICED_AGGREGATED_ORDER_STORE_ID" indexType="btree">
  1580. <column name="store_id"/>
  1581. </index>
  1582. </table>
  1583. <table name="sales_order_aggregated_created" resource="sales" engine="innodb"
  1584. comment="Sales Order Aggregated Created">
  1585. <column xsi:type="int" name="id" padding="10" unsigned="true" nullable="false" identity="true" comment="Id"/>
  1586. <column xsi:type="date" name="period" comment="Period"/>
  1587. <column xsi:type="smallint" name="store_id" padding="5" unsigned="true" nullable="true" identity="false"
  1588. comment="Store Id"/>
  1589. <column xsi:type="varchar" name="order_status" nullable="false" length="50" comment="Order Status"/>
  1590. <column xsi:type="int" name="orders_count" padding="11" unsigned="false" nullable="false" identity="false"
  1591. default="0" comment="Orders Count"/>
  1592. <column xsi:type="decimal" name="total_qty_ordered" scale="4" precision="12" unsigned="false" nullable="false"
  1593. default="0" comment="Total Qty Ordered"/>
  1594. <column xsi:type="decimal" name="total_qty_invoiced" scale="4" precision="12" unsigned="false" nullable="false"
  1595. default="0" comment="Total Qty Invoiced"/>
  1596. <column xsi:type="decimal" name="total_income_amount" scale="4" precision="20" unsigned="false"
  1597. nullable="false" default="0" comment="Total Income Amount"/>
  1598. <column xsi:type="decimal" name="total_revenue_amount" scale="4" precision="20" unsigned="false"
  1599. nullable="false" default="0" comment="Total Revenue Amount"/>
  1600. <column xsi:type="decimal" name="total_profit_amount" scale="4" precision="20" unsigned="false"
  1601. nullable="false" default="0" comment="Total Profit Amount"/>
  1602. <column xsi:type="decimal" name="total_invoiced_amount" scale="4" precision="20" unsigned="false"
  1603. nullable="false" default="0" comment="Total Invoiced Amount"/>
  1604. <column xsi:type="decimal" name="total_canceled_amount" scale="4" precision="20" unsigned="false"
  1605. nullable="false" default="0" comment="Total Canceled Amount"/>
  1606. <column xsi:type="decimal" name="total_paid_amount" scale="4" precision="20" unsigned="false" nullable="false"
  1607. default="0" comment="Total Paid Amount"/>
  1608. <column xsi:type="decimal" name="total_refunded_amount" scale="4" precision="20" unsigned="false"
  1609. nullable="false" default="0" comment="Total Refunded Amount"/>
  1610. <column xsi:type="decimal" name="total_tax_amount" scale="4" precision="20" unsigned="false" nullable="false"
  1611. default="0" comment="Total Tax Amount"/>
  1612. <column xsi:type="decimal" name="total_tax_amount_actual" scale="4" precision="20" unsigned="false"
  1613. nullable="false" default="0" comment="Total Tax Amount Actual"/>
  1614. <column xsi:type="decimal" name="total_shipping_amount" scale="4" precision="20" unsigned="false"
  1615. nullable="false" default="0" comment="Total Shipping Amount"/>
  1616. <column xsi:type="decimal" name="total_shipping_amount_actual" scale="4" precision="20" unsigned="false"
  1617. nullable="false" default="0" comment="Total Shipping Amount Actual"/>
  1618. <column xsi:type="decimal" name="total_discount_amount" scale="4" precision="20" unsigned="false"
  1619. nullable="false" default="0" comment="Total Discount Amount"/>
  1620. <column xsi:type="decimal" name="total_discount_amount_actual" scale="4" precision="20" unsigned="false"
  1621. nullable="false" default="0" comment="Total Discount Amount Actual"/>
  1622. <constraint xsi:type="primary" referenceId="PRIMARY">
  1623. <column name="id"/>
  1624. </constraint>
  1625. <constraint xsi:type="foreign" referenceId="SALES_ORDER_AGGREGATED_CREATED_STORE_ID_STORE_STORE_ID"
  1626. table="sales_order_aggregated_created" column="store_id" referenceTable="store"
  1627. referenceColumn="store_id" onDelete="SET NULL"/>
  1628. <constraint xsi:type="unique" referenceId="SALES_ORDER_AGGREGATED_CREATED_PERIOD_STORE_ID_ORDER_STATUS">
  1629. <column name="period"/>
  1630. <column name="store_id"/>
  1631. <column name="order_status"/>
  1632. </constraint>
  1633. <index referenceId="SALES_ORDER_AGGREGATED_CREATED_STORE_ID" indexType="btree">
  1634. <column name="store_id"/>
  1635. </index>
  1636. </table>
  1637. <table name="sales_order_aggregated_updated" resource="sales" engine="innodb"
  1638. comment="Sales Order Aggregated Updated">
  1639. <column xsi:type="int" name="id" padding="10" unsigned="true" nullable="false" identity="true" comment="Id"/>
  1640. <column xsi:type="date" name="period" comment="Period"/>
  1641. <column xsi:type="smallint" name="store_id" padding="5" unsigned="true" nullable="true" identity="false"
  1642. comment="Store Id"/>
  1643. <column xsi:type="varchar" name="order_status" nullable="false" length="50" comment="Order Status"/>
  1644. <column xsi:type="int" name="orders_count" padding="11" unsigned="false" nullable="false" identity="false"
  1645. default="0" comment="Orders Count"/>
  1646. <column xsi:type="decimal" name="total_qty_ordered" scale="4" precision="12" unsigned="false" nullable="false"
  1647. default="0" comment="Total Qty Ordered"/>
  1648. <column xsi:type="decimal" name="total_qty_invoiced" scale="4" precision="12" unsigned="false" nullable="false"
  1649. default="0" comment="Total Qty Invoiced"/>
  1650. <column xsi:type="decimal" name="total_income_amount" scale="4" precision="20" unsigned="false"
  1651. nullable="false" default="0" comment="Total Income Amount"/>
  1652. <column xsi:type="decimal" name="total_revenue_amount" scale="4" precision="20" unsigned="false"
  1653. nullable="false" default="0" comment="Total Revenue Amount"/>
  1654. <column xsi:type="decimal" name="total_profit_amount" scale="4" precision="20" unsigned="false"
  1655. nullable="false" default="0" comment="Total Profit Amount"/>
  1656. <column xsi:type="decimal" name="total_invoiced_amount" scale="4" precision="20" unsigned="false"
  1657. nullable="false" default="0" comment="Total Invoiced Amount"/>
  1658. <column xsi:type="decimal" name="total_canceled_amount" scale="4" precision="20" unsigned="false"
  1659. nullable="false" default="0" comment="Total Canceled Amount"/>
  1660. <column xsi:type="decimal" name="total_paid_amount" scale="4" precision="20" unsigned="false" nullable="false"
  1661. default="0" comment="Total Paid Amount"/>
  1662. <column xsi:type="decimal" name="total_refunded_amount" scale="4" precision="20" unsigned="false"
  1663. nullable="false" default="0" comment="Total Refunded Amount"/>
  1664. <column xsi:type="decimal" name="total_tax_amount" scale="4" precision="20" unsigned="false" nullable="false"
  1665. default="0" comment="Total Tax Amount"/>
  1666. <column xsi:type="decimal" name="total_tax_amount_actual" scale="4" precision="20" unsigned="false"
  1667. nullable="false" default="0" comment="Total Tax Amount Actual"/>
  1668. <column xsi:type="decimal" name="total_shipping_amount" scale="4" precision="20" unsigned="false"
  1669. nullable="false" default="0" comment="Total Shipping Amount"/>
  1670. <column xsi:type="decimal" name="total_shipping_amount_actual" scale="4" precision="20" unsigned="false"
  1671. nullable="false" default="0" comment="Total Shipping Amount Actual"/>
  1672. <column xsi:type="decimal" name="total_discount_amount" scale="4" precision="20" unsigned="false"
  1673. nullable="false" default="0" comment="Total Discount Amount"/>
  1674. <column xsi:type="decimal" name="total_discount_amount_actual" scale="4" precision="20" unsigned="false"
  1675. nullable="false" default="0" comment="Total Discount Amount Actual"/>
  1676. <constraint xsi:type="primary" referenceId="PRIMARY">
  1677. <column name="id"/>
  1678. </constraint>
  1679. <constraint xsi:type="foreign" referenceId="SALES_ORDER_AGGREGATED_UPDATED_STORE_ID_STORE_STORE_ID"
  1680. table="sales_order_aggregated_updated" column="store_id" referenceTable="store"
  1681. referenceColumn="store_id" onDelete="SET NULL"/>
  1682. <constraint xsi:type="unique" referenceId="SALES_ORDER_AGGREGATED_UPDATED_PERIOD_STORE_ID_ORDER_STATUS">
  1683. <column name="period"/>
  1684. <column name="store_id"/>
  1685. <column name="order_status"/>
  1686. </constraint>
  1687. <index referenceId="SALES_ORDER_AGGREGATED_UPDATED_STORE_ID" indexType="btree">
  1688. <column name="store_id"/>
  1689. </index>
  1690. </table>
  1691. <table name="sales_payment_transaction" resource="sales" engine="innodb" comment="Sales Payment Transaction">
  1692. <column xsi:type="int" name="transaction_id" padding="10" unsigned="true" nullable="false" identity="true"
  1693. comment="Transaction Id"/>
  1694. <column xsi:type="int" name="parent_id" padding="10" unsigned="true" nullable="true" identity="false"
  1695. comment="Parent Id"/>
  1696. <column xsi:type="int" name="order_id" padding="10" unsigned="true" nullable="false" identity="false"
  1697. default="0" comment="Order Id"/>
  1698. <column xsi:type="int" name="payment_id" padding="10" unsigned="true" nullable="false" identity="false"
  1699. default="0" comment="Payment Id"/>
  1700. <column xsi:type="varchar" name="txn_id" nullable="true" length="100" comment="Txn Id"/>
  1701. <column xsi:type="varchar" name="parent_txn_id" nullable="true" length="100" comment="Parent Txn Id"/>
  1702. <column xsi:type="varchar" name="txn_type" nullable="true" length="15" comment="Txn Type"/>
  1703. <column xsi:type="smallint" name="is_closed" padding="5" unsigned="true" nullable="false" identity="false"
  1704. default="1" comment="Is Closed"/>
  1705. <column xsi:type="blob" name="additional_information" nullable="true" comment="Additional Information"/>
  1706. <column xsi:type="timestamp" name="created_at" on_update="false" nullable="false" default="CURRENT_TIMESTAMP"
  1707. comment="Created At"/>
  1708. <constraint xsi:type="primary" referenceId="PRIMARY">
  1709. <column name="transaction_id"/>
  1710. </constraint>
  1711. <constraint xsi:type="foreign" referenceId="SALES_PAYMENT_TRANSACTION_ORDER_ID_SALES_ORDER_ENTITY_ID"
  1712. table="sales_payment_transaction" column="order_id" referenceTable="sales_order"
  1713. referenceColumn="entity_id" onDelete="CASCADE"/>
  1714. <constraint xsi:type="foreign" referenceId="FK_B99FF1A06402D725EBDB0F3A7ECD47A2" table="sales_payment_transaction"
  1715. column="parent_id" referenceTable="sales_payment_transaction" referenceColumn="transaction_id"
  1716. onDelete="CASCADE"/>
  1717. <constraint xsi:type="foreign" referenceId="SALES_PAYMENT_TRANSACTION_PAYMENT_ID_SALES_ORDER_PAYMENT_ENTT_ID"
  1718. table="sales_payment_transaction" column="payment_id" referenceTable="sales_order_payment"
  1719. referenceColumn="entity_id" onDelete="CASCADE"/>
  1720. <constraint xsi:type="unique" referenceId="SALES_PAYMENT_TRANSACTION_ORDER_ID_PAYMENT_ID_TXN_ID">
  1721. <column name="order_id"/>
  1722. <column name="payment_id"/>
  1723. <column name="txn_id"/>
  1724. </constraint>
  1725. <index referenceId="SALES_PAYMENT_TRANSACTION_PARENT_ID" indexType="btree">
  1726. <column name="parent_id"/>
  1727. </index>
  1728. <index referenceId="SALES_PAYMENT_TRANSACTION_PAYMENT_ID" indexType="btree">
  1729. <column name="payment_id"/>
  1730. </index>
  1731. </table>
  1732. <table name="sales_refunded_aggregated" resource="sales" engine="innodb" comment="Sales Refunded Aggregated">
  1733. <column xsi:type="int" name="id" padding="10" unsigned="true" nullable="false" identity="true" comment="Id"/>
  1734. <column xsi:type="date" name="period" comment="Period"/>
  1735. <column xsi:type="smallint" name="store_id" padding="5" unsigned="true" nullable="true" identity="false"
  1736. comment="Store Id"/>
  1737. <column xsi:type="varchar" name="order_status" nullable="false" length="50" comment="Order Status"/>
  1738. <column xsi:type="int" name="orders_count" padding="11" unsigned="false" nullable="false" identity="false"
  1739. default="0" comment="Orders Count"/>
  1740. <column xsi:type="decimal" name="refunded" scale="4" precision="20" unsigned="false" nullable="true"
  1741. comment="Refunded"/>
  1742. <column xsi:type="decimal" name="online_refunded" scale="4" precision="20" unsigned="false" nullable="true"
  1743. comment="Online Refunded"/>
  1744. <column xsi:type="decimal" name="offline_refunded" scale="4" precision="20" unsigned="false" nullable="true"
  1745. comment="Offline Refunded"/>
  1746. <constraint xsi:type="primary" referenceId="PRIMARY">
  1747. <column name="id"/>
  1748. </constraint>
  1749. <constraint xsi:type="foreign" referenceId="SALES_REFUNDED_AGGREGATED_STORE_ID_STORE_STORE_ID"
  1750. table="sales_refunded_aggregated" column="store_id" referenceTable="store"
  1751. referenceColumn="store_id" onDelete="SET NULL"/>
  1752. <constraint xsi:type="unique" referenceId="SALES_REFUNDED_AGGREGATED_PERIOD_STORE_ID_ORDER_STATUS">
  1753. <column name="period"/>
  1754. <column name="store_id"/>
  1755. <column name="order_status"/>
  1756. </constraint>
  1757. <index referenceId="SALES_REFUNDED_AGGREGATED_STORE_ID" indexType="btree">
  1758. <column name="store_id"/>
  1759. </index>
  1760. </table>
  1761. <table name="sales_refunded_aggregated_order" resource="sales" engine="innodb"
  1762. comment="Sales Refunded Aggregated Order">
  1763. <column xsi:type="int" name="id" padding="10" unsigned="true" nullable="false" identity="true" comment="Id"/>
  1764. <column xsi:type="date" name="period" comment="Period"/>
  1765. <column xsi:type="smallint" name="store_id" padding="5" unsigned="true" nullable="true" identity="false"
  1766. comment="Store Id"/>
  1767. <column xsi:type="varchar" name="order_status" nullable="true" length="50" comment="Order Status"/>
  1768. <column xsi:type="int" name="orders_count" padding="11" unsigned="false" nullable="false" identity="false"
  1769. default="0" comment="Orders Count"/>
  1770. <column xsi:type="decimal" name="refunded" scale="4" precision="20" unsigned="false" nullable="true"
  1771. comment="Refunded"/>
  1772. <column xsi:type="decimal" name="online_refunded" scale="4" precision="20" unsigned="false" nullable="true"
  1773. comment="Online Refunded"/>
  1774. <column xsi:type="decimal" name="offline_refunded" scale="4" precision="20" unsigned="false" nullable="true"
  1775. comment="Offline Refunded"/>
  1776. <constraint xsi:type="primary" referenceId="PRIMARY">
  1777. <column name="id"/>
  1778. </constraint>
  1779. <constraint xsi:type="foreign" referenceId="SALES_REFUNDED_AGGREGATED_ORDER_STORE_ID_STORE_STORE_ID"
  1780. table="sales_refunded_aggregated_order" column="store_id" referenceTable="store"
  1781. referenceColumn="store_id" onDelete="SET NULL"/>
  1782. <constraint xsi:type="unique" referenceId="SALES_REFUNDED_AGGREGATED_ORDER_PERIOD_STORE_ID_ORDER_STATUS">
  1783. <column name="period"/>
  1784. <column name="store_id"/>
  1785. <column name="order_status"/>
  1786. </constraint>
  1787. <index referenceId="SALES_REFUNDED_AGGREGATED_ORDER_STORE_ID" indexType="btree">
  1788. <column name="store_id"/>
  1789. </index>
  1790. </table>
  1791. <table name="sales_shipping_aggregated" resource="sales" engine="innodb" comment="Sales Shipping Aggregated">
  1792. <column xsi:type="int" name="id" padding="10" unsigned="true" nullable="false" identity="true" comment="Id"/>
  1793. <column xsi:type="date" name="period" comment="Period"/>
  1794. <column xsi:type="smallint" name="store_id" padding="5" unsigned="true" nullable="true" identity="false"
  1795. comment="Store Id"/>
  1796. <column xsi:type="varchar" name="order_status" nullable="true" length="50" comment="Order Status"/>
  1797. <column xsi:type="varchar" name="shipping_description" nullable="true" length="255"
  1798. comment="Shipping Description"/>
  1799. <column xsi:type="int" name="orders_count" padding="11" unsigned="false" nullable="false" identity="false"
  1800. default="0" comment="Orders Count"/>
  1801. <column xsi:type="decimal" name="total_shipping" scale="4" precision="20" unsigned="false" nullable="true"
  1802. comment="Total Shipping"/>
  1803. <column xsi:type="decimal" name="total_shipping_actual" scale="4" precision="20" unsigned="false"
  1804. nullable="true" comment="Total Shipping Actual"/>
  1805. <constraint xsi:type="primary" referenceId="PRIMARY">
  1806. <column name="id"/>
  1807. </constraint>
  1808. <constraint xsi:type="foreign" referenceId="SALES_SHIPPING_AGGREGATED_STORE_ID_STORE_STORE_ID"
  1809. table="sales_shipping_aggregated" column="store_id" referenceTable="store"
  1810. referenceColumn="store_id" onDelete="SET NULL"/>
  1811. <constraint xsi:type="unique" referenceId="SALES_SHPP_AGGRED_PERIOD_STORE_ID_ORDER_STS_SHPP_DESCRIPTION">
  1812. <column name="period"/>
  1813. <column name="store_id"/>
  1814. <column name="order_status"/>
  1815. <column name="shipping_description"/>
  1816. </constraint>
  1817. <index referenceId="SALES_SHIPPING_AGGREGATED_STORE_ID" indexType="btree">
  1818. <column name="store_id"/>
  1819. </index>
  1820. </table>
  1821. <table name="sales_shipping_aggregated_order" resource="sales" engine="innodb"
  1822. comment="Sales Shipping Aggregated Order">
  1823. <column xsi:type="int" name="id" padding="10" unsigned="true" nullable="false" identity="true" comment="Id"/>
  1824. <column xsi:type="date" name="period" comment="Period"/>
  1825. <column xsi:type="smallint" name="store_id" padding="5" unsigned="true" nullable="true" identity="false"
  1826. comment="Store Id"/>
  1827. <column xsi:type="varchar" name="order_status" nullable="true" length="50" comment="Order Status"/>
  1828. <column xsi:type="varchar" name="shipping_description" nullable="true" length="255"
  1829. comment="Shipping Description"/>
  1830. <column xsi:type="int" name="orders_count" padding="11" unsigned="false" nullable="false" identity="false"
  1831. default="0" comment="Orders Count"/>
  1832. <column xsi:type="decimal" name="total_shipping" scale="4" precision="20" unsigned="false" nullable="true"
  1833. comment="Total Shipping"/>
  1834. <column xsi:type="decimal" name="total_shipping_actual" scale="4" precision="20" unsigned="false"
  1835. nullable="true" comment="Total Shipping Actual"/>
  1836. <constraint xsi:type="primary" referenceId="PRIMARY">
  1837. <column name="id"/>
  1838. </constraint>
  1839. <constraint xsi:type="foreign" referenceId="SALES_SHIPPING_AGGREGATED_ORDER_STORE_ID_STORE_STORE_ID"
  1840. table="sales_shipping_aggregated_order" column="store_id" referenceTable="store"
  1841. referenceColumn="store_id" onDelete="SET NULL"/>
  1842. <constraint xsi:type="unique" referenceId="UNQ_C05FAE47282EEA68654D0924E946761F">
  1843. <column name="period"/>
  1844. <column name="store_id"/>
  1845. <column name="order_status"/>
  1846. <column name="shipping_description"/>
  1847. </constraint>
  1848. <index referenceId="SALES_SHIPPING_AGGREGATED_ORDER_STORE_ID" indexType="btree">
  1849. <column name="store_id"/>
  1850. </index>
  1851. </table>
  1852. <table name="sales_bestsellers_aggregated_daily" resource="sales" engine="innodb"
  1853. comment="Sales Bestsellers Aggregated Daily">
  1854. <column xsi:type="int" name="id" padding="10" unsigned="true" nullable="false" identity="true" comment="Id"/>
  1855. <column xsi:type="date" name="period" comment="Period"/>
  1856. <column xsi:type="smallint" name="store_id" padding="5" unsigned="true" nullable="true" identity="false"
  1857. comment="Store Id"/>
  1858. <column xsi:type="int" name="product_id" padding="10" unsigned="true" nullable="true" identity="false"
  1859. comment="Product Id"/>
  1860. <column xsi:type="varchar" name="product_name" nullable="true" length="255" comment="Product Name"/>
  1861. <column xsi:type="decimal" name="product_price" scale="4" precision="12" unsigned="false" nullable="false"
  1862. default="0" comment="Product Price"/>
  1863. <column xsi:type="decimal" name="qty_ordered" scale="4" precision="12" unsigned="false" nullable="false"
  1864. default="0" comment="Qty Ordered"/>
  1865. <column xsi:type="smallint" name="rating_pos" padding="5" unsigned="true" nullable="false" identity="false"
  1866. default="0" comment="Rating Pos"/>
  1867. <constraint xsi:type="primary" referenceId="PRIMARY">
  1868. <column name="id"/>
  1869. </constraint>
  1870. <constraint xsi:type="foreign" referenceId="SALES_BESTSELLERS_AGGREGATED_DAILY_STORE_ID_STORE_STORE_ID"
  1871. table="sales_bestsellers_aggregated_daily" column="store_id" referenceTable="store"
  1872. referenceColumn="store_id" onDelete="CASCADE"/>
  1873. <constraint xsi:type="unique" referenceId="SALES_BESTSELLERS_AGGREGATED_DAILY_PERIOD_STORE_ID_PRODUCT_ID">
  1874. <column name="period"/>
  1875. <column name="store_id"/>
  1876. <column name="product_id"/>
  1877. </constraint>
  1878. <index referenceId="SALES_BESTSELLERS_AGGREGATED_DAILY_STORE_ID" indexType="btree">
  1879. <column name="store_id"/>
  1880. </index>
  1881. <index referenceId="SALES_BESTSELLERS_AGGREGATED_DAILY_PRODUCT_ID" indexType="btree">
  1882. <column name="product_id"/>
  1883. </index>
  1884. </table>
  1885. <table name="sales_bestsellers_aggregated_monthly" resource="sales" engine="innodb"
  1886. comment="Sales Bestsellers Aggregated Monthly">
  1887. <column xsi:type="int" name="id" padding="10" unsigned="true" nullable="false" identity="true" comment="Id"/>
  1888. <column xsi:type="date" name="period" comment="Period"/>
  1889. <column xsi:type="smallint" name="store_id" padding="5" unsigned="true" nullable="true" identity="false"
  1890. comment="Store Id"/>
  1891. <column xsi:type="int" name="product_id" padding="10" unsigned="true" nullable="true" identity="false"
  1892. comment="Product Id"/>
  1893. <column xsi:type="varchar" name="product_name" nullable="true" length="255" comment="Product Name"/>
  1894. <column xsi:type="decimal" name="product_price" scale="4" precision="12" unsigned="false" nullable="false"
  1895. default="0" comment="Product Price"/>
  1896. <column xsi:type="decimal" name="qty_ordered" scale="4" precision="12" unsigned="false" nullable="false"
  1897. default="0" comment="Qty Ordered"/>
  1898. <column xsi:type="smallint" name="rating_pos" padding="5" unsigned="true" nullable="false" identity="false"
  1899. default="0" comment="Rating Pos"/>
  1900. <constraint xsi:type="primary" referenceId="PRIMARY">
  1901. <column name="id"/>
  1902. </constraint>
  1903. <constraint xsi:type="foreign" referenceId="SALES_BESTSELLERS_AGGREGATED_MONTHLY_STORE_ID_STORE_STORE_ID"
  1904. table="sales_bestsellers_aggregated_monthly" column="store_id" referenceTable="store"
  1905. referenceColumn="store_id" onDelete="CASCADE"/>
  1906. <constraint xsi:type="unique" referenceId="SALES_BESTSELLERS_AGGREGATED_MONTHLY_PERIOD_STORE_ID_PRODUCT_ID">
  1907. <column name="period"/>
  1908. <column name="store_id"/>
  1909. <column name="product_id"/>
  1910. </constraint>
  1911. <index referenceId="SALES_BESTSELLERS_AGGREGATED_MONTHLY_STORE_ID" indexType="btree">
  1912. <column name="store_id"/>
  1913. </index>
  1914. <index referenceId="SALES_BESTSELLERS_AGGREGATED_MONTHLY_PRODUCT_ID" indexType="btree">
  1915. <column name="product_id"/>
  1916. </index>
  1917. </table>
  1918. <table name="sales_bestsellers_aggregated_yearly" resource="sales" engine="innodb"
  1919. comment="Sales Bestsellers Aggregated Yearly">
  1920. <column xsi:type="int" name="id" padding="10" unsigned="true" nullable="false" identity="true" comment="Id"/>
  1921. <column xsi:type="date" name="period" comment="Period"/>
  1922. <column xsi:type="smallint" name="store_id" padding="5" unsigned="true" nullable="true" identity="false"
  1923. comment="Store Id"/>
  1924. <column xsi:type="int" name="product_id" padding="10" unsigned="true" nullable="true" identity="false"
  1925. comment="Product Id"/>
  1926. <column xsi:type="varchar" name="product_name" nullable="true" length="255" comment="Product Name"/>
  1927. <column xsi:type="decimal" name="product_price" scale="4" precision="12" unsigned="false" nullable="false"
  1928. default="0" comment="Product Price"/>
  1929. <column xsi:type="decimal" name="qty_ordered" scale="4" precision="12" unsigned="false" nullable="false"
  1930. default="0" comment="Qty Ordered"/>
  1931. <column xsi:type="smallint" name="rating_pos" padding="5" unsigned="true" nullable="false" identity="false"
  1932. default="0" comment="Rating Pos"/>
  1933. <constraint xsi:type="primary" referenceId="PRIMARY">
  1934. <column name="id"/>
  1935. </constraint>
  1936. <constraint xsi:type="foreign" referenceId="SALES_BESTSELLERS_AGGREGATED_YEARLY_STORE_ID_STORE_STORE_ID"
  1937. table="sales_bestsellers_aggregated_yearly" column="store_id" referenceTable="store"
  1938. referenceColumn="store_id" onDelete="CASCADE"/>
  1939. <constraint xsi:type="unique" referenceId="SALES_BESTSELLERS_AGGREGATED_YEARLY_PERIOD_STORE_ID_PRODUCT_ID">
  1940. <column name="period"/>
  1941. <column name="store_id"/>
  1942. <column name="product_id"/>
  1943. </constraint>
  1944. <index referenceId="SALES_BESTSELLERS_AGGREGATED_YEARLY_STORE_ID" indexType="btree">
  1945. <column name="store_id"/>
  1946. </index>
  1947. <index referenceId="SALES_BESTSELLERS_AGGREGATED_YEARLY_PRODUCT_ID" indexType="btree">
  1948. <column name="product_id"/>
  1949. </index>
  1950. </table>
  1951. <table name="sales_order_tax" resource="sales" engine="innodb" comment="Sales Order Tax Table">
  1952. <column xsi:type="int" name="tax_id" padding="10" unsigned="true" nullable="false" identity="true"
  1953. comment="Tax Id"/>
  1954. <column xsi:type="int" name="order_id" padding="10" unsigned="true" nullable="false" identity="false"
  1955. comment="Order Id"/>
  1956. <column xsi:type="varchar" name="code" nullable="true" length="255" comment="Code"/>
  1957. <column xsi:type="varchar" name="title" nullable="true" length="255" comment="Title"/>
  1958. <column xsi:type="decimal" name="percent" scale="4" precision="12" unsigned="false" nullable="true"
  1959. comment="Percent"/>
  1960. <column xsi:type="decimal" name="amount" scale="4" precision="20" unsigned="false" nullable="true"
  1961. comment="Amount"/>
  1962. <column xsi:type="int" name="priority" padding="11" unsigned="false" nullable="false" identity="false"
  1963. comment="Priority"/>
  1964. <column xsi:type="int" name="position" padding="11" unsigned="false" nullable="false" identity="false"
  1965. comment="Position"/>
  1966. <column xsi:type="decimal" name="base_amount" scale="4" precision="20" unsigned="false" nullable="true"
  1967. comment="Base Amount"/>
  1968. <column xsi:type="smallint" name="process" padding="6" unsigned="false" nullable="false" identity="false"
  1969. comment="Process"/>
  1970. <column xsi:type="decimal" name="base_real_amount" scale="4" precision="20" unsigned="false" nullable="true"
  1971. comment="Base Real Amount"/>
  1972. <constraint xsi:type="primary" referenceId="PRIMARY">
  1973. <column name="tax_id"/>
  1974. </constraint>
  1975. <index referenceId="SALES_ORDER_TAX_ORDER_ID_PRIORITY_POSITION" indexType="btree">
  1976. <column name="order_id"/>
  1977. <column name="priority"/>
  1978. <column name="position"/>
  1979. </index>
  1980. </table>
  1981. <table name="sales_order_tax_item" resource="sales" engine="innodb" comment="Sales Order Tax Item">
  1982. <column xsi:type="int" name="tax_item_id" padding="10" unsigned="true" nullable="false" identity="true"
  1983. comment="Tax Item Id"/>
  1984. <column xsi:type="int" name="tax_id" padding="10" unsigned="true" nullable="false" identity="false"
  1985. comment="Tax Id"/>
  1986. <column xsi:type="int" name="item_id" padding="10" unsigned="true" nullable="true" identity="false"
  1987. comment="Item Id"/>
  1988. <column xsi:type="decimal" name="tax_percent" scale="4" precision="12" unsigned="false" nullable="false"
  1989. comment="Real Tax Percent For Item"/>
  1990. <column xsi:type="decimal" name="amount" scale="4" precision="20" unsigned="false" nullable="false"
  1991. comment="Tax amount for the item and tax rate"/>
  1992. <column xsi:type="decimal" name="base_amount" scale="4" precision="20" unsigned="false" nullable="false"
  1993. comment="Base tax amount for the item and tax rate"/>
  1994. <column xsi:type="decimal" name="real_amount" scale="4" precision="20" unsigned="false" nullable="false"
  1995. comment="Real tax amount for the item and tax rate"/>
  1996. <column xsi:type="decimal" name="real_base_amount" scale="4" precision="20" unsigned="false" nullable="false"
  1997. comment="Real base tax amount for the item and tax rate"/>
  1998. <column xsi:type="int" name="associated_item_id" padding="10" unsigned="true" nullable="true" identity="false"
  1999. comment="Id of the associated item"/>
  2000. <column xsi:type="varchar" name="taxable_item_type" nullable="false" length="32"
  2001. comment="Type of the taxable item"/>
  2002. <constraint xsi:type="primary" referenceId="PRIMARY">
  2003. <column name="tax_item_id"/>
  2004. </constraint>
  2005. <constraint xsi:type="foreign" referenceId="SALES_ORDER_TAX_ITEM_ASSOCIATED_ITEM_ID_SALES_ORDER_ITEM_ITEM_ID"
  2006. table="sales_order_tax_item" column="associated_item_id" referenceTable="sales_order_item"
  2007. referenceColumn="item_id" onDelete="CASCADE"/>
  2008. <constraint xsi:type="foreign" referenceId="SALES_ORDER_TAX_ITEM_TAX_ID_SALES_ORDER_TAX_TAX_ID"
  2009. table="sales_order_tax_item" column="tax_id" referenceTable="sales_order_tax"
  2010. referenceColumn="tax_id" onDelete="CASCADE"/>
  2011. <constraint xsi:type="foreign" referenceId="SALES_ORDER_TAX_ITEM_ITEM_ID_SALES_ORDER_ITEM_ITEM_ID"
  2012. table="sales_order_tax_item" column="item_id" referenceTable="sales_order_item"
  2013. referenceColumn="item_id" onDelete="CASCADE"/>
  2014. <constraint xsi:type="unique" referenceId="SALES_ORDER_TAX_ITEM_TAX_ID_ITEM_ID">
  2015. <column name="tax_id"/>
  2016. <column name="item_id"/>
  2017. </constraint>
  2018. <index referenceId="SALES_ORDER_TAX_ITEM_ITEM_ID" indexType="btree">
  2019. <column name="item_id"/>
  2020. </index>
  2021. </table>
  2022. <table name="sales_order_status" resource="sales" engine="innodb" comment="Sales Order Status Table">
  2023. <column xsi:type="varchar" name="status" nullable="false" length="32" comment="Status"/>
  2024. <column xsi:type="varchar" name="label" nullable="false" length="128" comment="Label"/>
  2025. <constraint xsi:type="primary" referenceId="PRIMARY">
  2026. <column name="status"/>
  2027. </constraint>
  2028. </table>
  2029. <table name="sales_order_status_state" resource="sales" engine="innodb" comment="Sales Order Status Table">
  2030. <column xsi:type="varchar" name="status" nullable="false" length="32" comment="Status"/>
  2031. <column xsi:type="varchar" name="state" nullable="false" length="32" comment="Label"/>
  2032. <column xsi:type="smallint" name="is_default" padding="5" unsigned="true" nullable="false" identity="false"
  2033. default="0" comment="Is Default"/>
  2034. <column xsi:type="smallint" name="visible_on_front" padding="5" unsigned="true" nullable="false"
  2035. identity="false" default="0" comment="Visible on front"/>
  2036. <constraint xsi:type="primary" referenceId="PRIMARY">
  2037. <column name="status"/>
  2038. <column name="state"/>
  2039. </constraint>
  2040. <constraint xsi:type="foreign" referenceId="SALES_ORDER_STATUS_STATE_STATUS_SALES_ORDER_STATUS_STATUS"
  2041. table="sales_order_status_state" column="status" referenceTable="sales_order_status"
  2042. referenceColumn="status" onDelete="CASCADE"/>
  2043. </table>
  2044. <table name="sales_order_status_label" resource="sales" engine="innodb" comment="Sales Order Status Label Table">
  2045. <column xsi:type="varchar" name="status" nullable="false" length="32" comment="Status"/>
  2046. <column xsi:type="smallint" name="store_id" padding="5" unsigned="true" nullable="false" identity="false"
  2047. comment="Store Id"/>
  2048. <column xsi:type="varchar" name="label" nullable="false" length="128" comment="Label"/>
  2049. <constraint xsi:type="primary" referenceId="PRIMARY">
  2050. <column name="status"/>
  2051. <column name="store_id"/>
  2052. </constraint>
  2053. <constraint xsi:type="foreign" referenceId="SALES_ORDER_STATUS_LABEL_STATUS_SALES_ORDER_STATUS_STATUS"
  2054. table="sales_order_status_label" column="status" referenceTable="sales_order_status"
  2055. referenceColumn="status" onDelete="CASCADE"/>
  2056. <constraint xsi:type="foreign" referenceId="SALES_ORDER_STATUS_LABEL_STORE_ID_STORE_STORE_ID"
  2057. table="sales_order_status_label" column="store_id" referenceTable="store" referenceColumn="store_id"
  2058. onDelete="CASCADE"/>
  2059. <index referenceId="SALES_ORDER_STATUS_LABEL_STORE_ID" indexType="btree">
  2060. <column name="store_id"/>
  2061. </index>
  2062. </table>
  2063. </schema>