You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

87 lines
5.4 KiB

  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="magento_bulk" resource="default" engine="innodb"
  11. comment="Bulk entity that represents set of related asynchronous operations">
  12. <column xsi:type="int" name="id" padding="10" unsigned="true" nullable="false" identity="true"
  13. comment="Bulk Internal ID (must not be exposed)"/>
  14. <column xsi:type="varbinary" name="uuid" nullable="true" length="39"
  15. comment="Bulk UUID (can be exposed to reference bulk entity)"/>
  16. <column xsi:type="int" name="user_id" padding="10" unsigned="true" nullable="true" identity="false"
  17. comment="ID of the WebAPI user that performed an action"/>
  18. <column xsi:type="int" name="user_type" nullable="true" comment="Which type of user"/>
  19. <column xsi:type="varchar" name="description" nullable="true" length="255" comment="Bulk Description"/>
  20. <column xsi:type="int" name="operation_count" padding="10" unsigned="true" nullable="false" identity="false"
  21. comment="Total number of operations scheduled within this bulk"/>
  22. <column xsi:type="timestamp" name="start_time" on_update="false" nullable="false" default="CURRENT_TIMESTAMP"
  23. comment="Bulk start time"/>
  24. <constraint xsi:type="primary" referenceId="PRIMARY">
  25. <column name="id"/>
  26. </constraint>
  27. <constraint xsi:type="unique" referenceId="MAGENTO_BULK_UUID">
  28. <column name="uuid"/>
  29. </constraint>
  30. <index referenceId="MAGENTO_BULK_USER_ID_ADMIN_USER_USER_ID" indexType="btree">
  31. <column name="user_id"/>
  32. </index>
  33. <index referenceId="MAGENTO_BULK_START_TIME" indexType="btree">
  34. <column name="start_time"/>
  35. </index>
  36. </table>
  37. <table name="magento_operation" resource="default" engine="innodb" comment="Operation entity">
  38. <column xsi:type="int" name="id" padding="10" unsigned="true" nullable="false" identity="true"
  39. comment="Operation ID"/>
  40. <column xsi:type="int" name="operation_key" padding="10" unsigned="true" nullable="true"
  41. comment="Operation Key"/>
  42. <column xsi:type="varbinary" name="bulk_uuid" nullable="true" length="39" comment="Related Bulk UUID"/>
  43. <column xsi:type="varchar" name="topic_name" nullable="true" length="255"
  44. comment="Name of the related message queue topic"/>
  45. <column xsi:type="blob" name="serialized_data" nullable="true"
  46. comment="Data (serialized) required to perform an operation"/>
  47. <column xsi:type="blob" name="result_serialized_data" nullable="true"
  48. comment="Result data (serialized) after perform an operation"/>
  49. <column xsi:type="smallint" name="status" padding="6" unsigned="false" nullable="true" identity="false"
  50. default="0" comment="Operation status (OPEN | COMPLETE | RETRIABLY_FAILED | NOT_RETRIABLY_FAILED)"/>
  51. <column xsi:type="smallint" name="error_code" padding="6" unsigned="false" nullable="true" identity="false"
  52. comment="Code of the error that appeared during operation execution (used to aggregate related failed operations)"/>
  53. <column xsi:type="varchar" name="result_message" nullable="true" length="255"
  54. comment="Operation result message"/>
  55. <column xsi:type="timestamp" name="started_at" on_update="false" nullable="true" default="NULL"
  56. comment="Datetime the operation started processing"/>
  57. <constraint xsi:type="primary" referenceId="PRIMARY">
  58. <column name="id"/>
  59. </constraint>
  60. <constraint xsi:type="foreign" referenceId="MAGENTO_OPERATION_BULK_UUID_MAGENTO_BULK_UUID" table="magento_operation"
  61. column="bulk_uuid" referenceTable="magento_bulk" referenceColumn="uuid" onDelete="CASCADE"/>
  62. <index referenceId="MAGENTO_OPERATION_BULK_UUID_ERROR_CODE" indexType="btree">
  63. <column name="bulk_uuid"/>
  64. <column name="error_code"/>
  65. </index>
  66. <index referenceId="MAGENTO_OPERATION_STATUS_STARTED_AT" indexType="btree">
  67. <column name="status"/>
  68. <column name="started_at"/>
  69. </index>
  70. </table>
  71. <table name="magento_acknowledged_bulk" resource="default" engine="innodb"
  72. comment="Bulk that was viewed by user from notification area">
  73. <column xsi:type="int" name="id" padding="10" unsigned="true" nullable="false" identity="true"
  74. comment="Internal ID"/>
  75. <column xsi:type="varbinary" name="bulk_uuid" nullable="true" length="39" comment="Related Bulk UUID"/>
  76. <constraint xsi:type="primary" referenceId="PRIMARY">
  77. <column name="id"/>
  78. </constraint>
  79. <constraint xsi:type="foreign" referenceId="MAGENTO_ACKNOWLEDGED_BULK_BULK_UUID_MAGENTO_BULK_UUID"
  80. table="magento_acknowledged_bulk" column="bulk_uuid" referenceTable="magento_bulk"
  81. referenceColumn="uuid" onDelete="CASCADE"/>
  82. <constraint xsi:type="unique" referenceId="MAGENTO_ACKNOWLEDGED_BULK_BULK_UUID">
  83. <column name="bulk_uuid"/>
  84. </constraint>
  85. </table>
  86. </schema>