123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475 |
- <?xml version="1.0"?>
- <!--
- /**
- * Copyright © Magento, Inc. All rights reserved.
- * See COPYING.txt for license details.
- */
- -->
- <schema xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:noNamespaceSchemaLocation="urn:magento:framework:Setup/Declaration/Schema/etc/schema.xsd">
- <table name="magento_bulk" resource="default" engine="innodb"
- comment="Bulk entity that represents set of related asynchronous operations">
- <column xsi:type="int" name="id" padding="10" unsigned="true" nullable="false" identity="true"
- comment="Bulk Internal ID (must not be exposed)"/>
- <column xsi:type="varbinary" name="uuid" nullable="true" length="39"
- comment="Bulk UUID (can be exposed to reference bulk entity)"/>
- <column xsi:type="int" name="user_id" padding="10" unsigned="true" nullable="true" identity="false"
- comment="ID of the WebAPI user that performed an action"/>
- <column xsi:type="int" name="user_type" nullable="true" comment="Which type of user"/>
- <column xsi:type="varchar" name="description" nullable="true" length="255" comment="Bulk Description"/>
- <column xsi:type="int" name="operation_count" padding="10" unsigned="true" nullable="false" identity="false"
- comment="Total number of operations scheduled within this bulk"/>
- <column xsi:type="timestamp" name="start_time" on_update="false" nullable="false" default="CURRENT_TIMESTAMP"
- comment="Bulk start time"/>
- <constraint xsi:type="primary" referenceId="PRIMARY">
- <column name="id"/>
- </constraint>
- <constraint xsi:type="unique" referenceId="MAGENTO_BULK_UUID">
- <column name="uuid"/>
- </constraint>
- <index referenceId="MAGENTO_BULK_USER_ID_ADMIN_USER_USER_ID" indexType="btree">
- <column name="user_id"/>
- </index>
- </table>
- <table name="magento_operation" resource="default" engine="innodb" comment="Operation entity">
- <column xsi:type="int" name="id" padding="10" unsigned="true" nullable="false" identity="true"
- comment="Operation ID"/>
- <column xsi:type="varbinary" name="bulk_uuid" nullable="true" length="39" comment="Related Bulk UUID"/>
- <column xsi:type="varchar" name="topic_name" nullable="true" length="255"
- comment="Name of the related message queue topic"/>
- <column xsi:type="blob" name="serialized_data" nullable="true"
- comment="Data (serialized) required to perform an operation"/>
- <column xsi:type="blob" name="result_serialized_data" nullable="true"
- comment="Result data (serialized) after perform an operation"/>
- <column xsi:type="smallint" name="status" padding="6" unsigned="false" nullable="true" identity="false"
- default="0" comment="Operation status (OPEN | COMPLETE | RETRIABLY_FAILED | NOT_RETRIABLY_FAILED)"/>
- <column xsi:type="smallint" name="error_code" padding="6" unsigned="false" nullable="true" identity="false"
- comment="Code of the error that appeared during operation execution (used to aggregate related failed operations)"/>
- <column xsi:type="varchar" name="result_message" nullable="true" length="255"
- comment="Operation result message"/>
- <constraint xsi:type="primary" referenceId="PRIMARY">
- <column name="id"/>
- </constraint>
- <constraint xsi:type="foreign" referenceId="MAGENTO_OPERATION_BULK_UUID_MAGENTO_BULK_UUID" table="magento_operation"
- column="bulk_uuid" referenceTable="magento_bulk" referenceColumn="uuid" onDelete="CASCADE"/>
- <index referenceId="MAGENTO_OPERATION_BULK_UUID_ERROR_CODE" indexType="btree">
- <column name="bulk_uuid"/>
- <column name="error_code"/>
- </index>
- </table>
- <table name="magento_acknowledged_bulk" resource="default" engine="innodb"
- comment="Bulk that was viewed by user from notification area">
- <column xsi:type="int" name="id" padding="10" unsigned="true" nullable="false" identity="true"
- comment="Internal ID"/>
- <column xsi:type="varbinary" name="bulk_uuid" nullable="true" length="39" comment="Related Bulk UUID"/>
- <constraint xsi:type="primary" referenceId="PRIMARY">
- <column name="id"/>
- </constraint>
- <constraint xsi:type="foreign" referenceId="MAGENTO_ACKNOWLEDGED_BULK_BULK_UUID_MAGENTO_BULK_UUID"
- table="magento_acknowledged_bulk" column="bulk_uuid" referenceTable="magento_bulk"
- referenceColumn="uuid" onDelete="CASCADE"/>
- <constraint xsi:type="unique" referenceId="MAGENTO_ACKNOWLEDGED_BULK_BULK_UUID">
- <column name="bulk_uuid"/>
- </constraint>
- </table>
- </schema>
|