forked from opengento/magento2-gdpr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdb_schema.xml
77 lines (77 loc) · 4.77 KB
/
db_schema.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
<?xml version="1.0"?>
<!--
/**
* Copyright © OpenGento, All rights reserved.
* See LICENSE bundled with this library 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="opengento_gdpr_erase_entity" resource="default" engine="innodb" comment="Erase Entity">
<column xsi:type="int" name="erase_id" padding="11" unsigned="true" nullable="false" identity="true" comment="Erase ID"/>
<column xsi:type="int" name="entity_id" padding="10" unsigned="true" nullable="false" comment="Entity ID"/>
<column xsi:type="varchar" name="entity_type" length="255" nullable="false" comment="Entity Type"/>
<column xsi:type="timestamp" name="scheduled_at" nullable="false" comment="Scheduled At"/>
<column xsi:type="varchar" name="state" length="191" nullable="false" comment="State"/>
<column xsi:type="varchar" name="status" length="191" nullable="false" comment="Status"/>
<column xsi:type="text" name="message" nullable="true" comment="Message"/>
<column xsi:type="timestamp" name="erased_at" nullable="true" comment="Erased At"/>
<constraint xsi:type="primary" referenceId="PRIMARY">
<column name="erase_id"/>
</constraint>
<!--<constraint xsi:type="unique" referenceId="OPENGENTO_GDPR_ERASE_ENTITY_ENTITY_ID_ENTITY_TYPE">
<column name="entity_id"/>
<column name="entity_type"/>
</constraint>-->
<index referenceId="OPENGENTO_GDPR_ERASE_ENTITY_IDENTITY" indexType="btree">
<column name="entity_type"/>
<column name="entity_id"/>
</index>
<index referenceId="OPENGENTO_GDPR_ERASE_ENTITY_SCHEDULED_EXPORT" indexType="btree">
<column name="scheduled_at"/>
<column name="state"/>
<column name="status"/>
</index>
</table>
<table name="opengento_gdpr_export_entity" resource="default" engine="innodb" comment="Export Entity">
<column xsi:type="int" name="export_id" padding="11" unsigned="true" nullable="false" identity="true" comment="Export ID"/>
<column xsi:type="int" name="entity_id" padding="10" unsigned="true" nullable="false" comment="Entity ID"/>
<column xsi:type="varchar" name="entity_type" length="191" nullable="false" comment="Entity Type"/>
<column xsi:type="varchar" name="file_name" length="255" nullable="false" comment="File Name"/>
<column xsi:type="text" name="file_path" nullable="true" comment="File Path"/>
<column xsi:type="timestamp" name="created_at" on_update="false" nullable="false" default="CURRENT_TIMESTAMP" comment="Created At"/>
<column xsi:type="timestamp" name="exported_at" nullable="true" comment="Exported At"/>
<column xsi:type="timestamp" name="expired_at" nullable="true" comment="Expired At"/>
<constraint xsi:type="primary" referenceId="PRIMARY">
<column name="export_id"/>
</constraint>
<index referenceId="OPENGENTO_GDPR_EXPORT_ENTITY_IDENTITY" indexType="btree">
<column name="entity_id"/>
<column name="entity_type"/>
</index>
<index referenceId="OPENGENTO_GDPR_EXPORT_ENTITY_EXPORTED_AT" indexType="btree">
<column name="exported_at"/>
</index>
<index referenceId="OPENGENTO_GDPR_EXPORT_ENTITY_EXPIRED_AT" indexType="btree">
<column name="expired_at"/>
</index>
</table>
<table name="opengento_gdpr_action_entity" resource="default" engine="innodb" comment="Action Entity">
<column xsi:type="int" name="action_id" padding="11" unsigned="true" nullable="false" identity="true" comment="Export ID"/>
<column xsi:type="varchar" name="type" length="191" nullable="false" comment="Type"/>
<column xsi:type="text" name="performed_from" nullable="false" comment="Performed From"/>
<column xsi:type="text" name="performed_by" nullable="true" comment="Performed By"/>
<column xsi:type="timestamp" name="performed_at" nullable="false" comment="Performed At"/>
<column xsi:type="varchar" name="state" length="191" nullable="false" comment="State"/>
<column xsi:type="text" name="message" nullable="false" comment="Message"/>
<column xsi:type="text" name="parameters" nullable="false" comment="Parameters"/>
<constraint xsi:type="primary" referenceId="PRIMARY">
<column name="action_id"/>
</constraint>
<index referenceId="OPENGENTO_GDPR_ACTION_ENTITY_TYPE" indexType="btree">
<column name="type"/>
</index>
<index referenceId="OPENGENTO_GDPR_ACTION_ENTITY_STATE" indexType="btree">
<column name="state"/>
</index>
</table>
</schema>