diff --git a/etc/db_schema.xml b/etc/db_schema.xml new file mode 100644 index 0000000000000000000000000000000000000000..119d4c779b39ff55f96fc751b504900896b1e150 --- /dev/null +++ b/etc/db_schema.xml @@ -0,0 +1,36 @@ +<?xml version="1.0"?> +<schema xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Setup/Declaration/Schema/etc/schema.xsd"> + <table name="nicolasbejean_categorywidget" resource="default" engine="innodb" comment="Category Widget Table"> + <column xsi:type="smallint" name="entity_id" padding="6" unsigned="false" nullable="false" identity="true" comment="Category Widget Entity ID"/> + <column xsi:type="varchar" name="title" nullable="false" length="255" comment="Category Widget Title"/> + <column xsi:type="varchar" name="identifier" nullable="false" length="255" comment="Category Widget String Identifier"/> + <column xsi:type="varchar" name="content" nullable="false" length="255" comment="Category Widget Content"/> + <column xsi:type="smallint" name="is_active" padding="6" unsigned="false" nullable="false" identity="false" default="1" comment="Is Category Widget Active"/> + <column xsi:type="timestamp" name="created_at" on_update="false" nullable="false" default="CURRENT_TIMESTAMP" comment="Category Widget Created At"/> + <column xsi:type="timestamp" name="updated_at" on_update="true" nullable="false" default="CURRENT_TIMESTAMP" comment="Category Widget Updated At"/> + <constraint xsi:type="primary" referenceId="PRIMARY"> + <column name="entity_id"/> + </constraint> + <index referenceId="NICOLASBEJEAN_CATEGORYWIDGET_TITLE_IDENTIFIER_CONTENT" indexType="fulltext"> + <column name="title"/> + <column name="identifier"/> + <column name="content"/> + </index> + </table> + + <table name="nicolasbejean_categorywidget_store" resource="default" engine="innodb" comment="Category Widget To Store Linkage Table"> + <column xsi:type="smallint" name="entity_id" padding="6" unsigned="false" nullable="false" identity="false"/> + <column xsi:type="smallint" name="store_id" padding="5" unsigned="true" nullable="false" identity="false" comment="Store ID"/> + <constraint xsi:type="primary" referenceId="PRIMARY"> + <column name="entity_id"/> + <column name="store_id"/> + </constraint> + <constraint xsi:type="foreign" referenceId="NICOLASBEJEAN_CATEGORYWIDGET_STORE_ENTITY_ID_NICOLASBEJEAN_CATEGORYWIDGET_ENTITY_ID" table="nicolasbejean_categorywidget_store" + column="entity_id" referenceTable="nicolasbejean_categorywidget" referenceColumn="entity_id" onDelete="CASCADE"/> + <constraint xsi:type="foreign" referenceId="NICOLASBEJEAN_CATEGORYWIDGET_STORE_STORE_ID_STORE_STORE_ID" table="nicolasbejean_categorywidget_store" + column="store_id" referenceTable="store" referenceColumn="store_id" onDelete="CASCADE"/> + <index referenceId="NICOLASBEJEAN_CATEGORYWIDGET_STORE_STORE_ID" indexType="btree"> + <column name="store_id"/> + </index> + </table> +</schema> diff --git a/etc/db_schema_whitelist.json b/etc/db_schema_whitelist.json new file mode 100644 index 0000000000000000000000000000000000000000..28544d974c2ede6f7dda707cc3b27cb153fc25ff --- /dev/null +++ b/etc/db_schema_whitelist.json @@ -0,0 +1,33 @@ +{ + "nicolasbejean_categorywidget": { + "column": { + "entity_id": true, + "title": true, + "identifier": true, + "content": true, + "is_active": true, + "created_at": true, + "updated_at": true + }, + "index": { + "NICOLASBEJEAN_CATEGORYWIDGET_TITLE_IDENTIFIER_CONTENT": true + }, + "constraint": { + "PRIMARY": true + } + }, + "nicolasbejean_categorywidget_store": { + "column": { + "entity_id": true, + "store_id": true + }, + "index": { + "NICOLASBEJEAN_CATEGORYWIDGET_STORE_STORE_ID": true + }, + "constraint": { + "PRIMARY": true, + "FK_A74AA48FB295EA4DACE6FCBE3752A364": true, + "NICOLASBEJEAN_CATEGORYWIDGET_STORE_STORE_ID_STORE_STORE_ID": true + } + } +} \ No newline at end of file