12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- <?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="variable" resource="default" engine="innodb" comment="Variables">
- <column xsi:type="int" name="variable_id" padding="10" unsigned="true" nullable="false" identity="true"
- comment="Variable Id"/>
- <column xsi:type="varchar" name="code" nullable="true" length="255" comment="Variable Code"/>
- <column xsi:type="varchar" name="name" nullable="true" length="255" comment="Variable Name"/>
- <constraint xsi:type="primary" referenceId="PRIMARY">
- <column name="variable_id"/>
- </constraint>
- <constraint xsi:type="unique" referenceId="VARIABLE_CODE">
- <column name="code"/>
- </constraint>
- </table>
- <table name="variable_value" resource="default" engine="innodb" comment="Variable Value">
- <column xsi:type="int" name="value_id" padding="10" unsigned="true" nullable="false" identity="true"
- comment="Variable Value Id"/>
- <column xsi:type="int" name="variable_id" padding="10" unsigned="true" nullable="false" identity="false"
- default="0" comment="Variable Id"/>
- <column xsi:type="smallint" name="store_id" padding="5" unsigned="true" nullable="false" identity="false"
- default="0" comment="Store Id"/>
- <column xsi:type="text" name="plain_value" nullable="true" comment="Plain Text Value"/>
- <column xsi:type="text" name="html_value" nullable="true" comment="Html Value"/>
- <constraint xsi:type="primary" referenceId="PRIMARY">
- <column name="value_id"/>
- </constraint>
- <constraint xsi:type="unique" referenceId="VARIABLE_VALUE_VARIABLE_ID_STORE_ID">
- <column name="variable_id"/>
- <column name="store_id"/>
- </constraint>
- <constraint xsi:type="foreign" referenceId="VARIABLE_VALUE_STORE_ID_STORE_STORE_ID" table="variable_value"
- column="store_id" referenceTable="store" referenceColumn="store_id" onDelete="CASCADE"/>
- <constraint xsi:type="foreign" referenceId="VARIABLE_VALUE_VARIABLE_ID_VARIABLE_VARIABLE_ID" table="variable_value"
- column="variable_id" referenceTable="variable" referenceColumn="variable_id" onDelete="CASCADE"/>
- <index referenceId="VARIABLE_VALUE_STORE_ID" indexType="btree">
- <column name="store_id"/>
- </index>
- </table>
- </schema>
|