db_schema.xml 2.0 KB

1234567891011121314151617181920212223242526272829303132
  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="catalog_url_rewrite_product_category" resource="default" engine="innodb"
  11. comment="url_rewrite_relation">
  12. <column xsi:type="int" name="url_rewrite_id" padding="10" unsigned="true" nullable="false" identity="false"
  13. comment="url_rewrite_id"/>
  14. <column xsi:type="int" name="category_id" padding="10" unsigned="true" nullable="false" identity="false"
  15. comment="category_id"/>
  16. <column xsi:type="int" name="product_id" padding="10" unsigned="true" nullable="false" identity="false"
  17. comment="product_id"/>
  18. <constraint xsi:type="foreign" referenceId="CAT_URL_REWRITE_PRD_CTGR_PRD_ID_CAT_PRD_ENTT_ENTT_ID"
  19. table="catalog_url_rewrite_product_category" column="product_id"
  20. referenceTable="catalog_product_entity" referenceColumn="entity_id" onDelete="CASCADE"/>
  21. <constraint xsi:type="foreign" referenceId="FK_BB79E64705D7F17FE181F23144528FC8"
  22. table="catalog_url_rewrite_product_category" column="url_rewrite_id" referenceTable="url_rewrite"
  23. referenceColumn="url_rewrite_id" onDelete="CASCADE"/>
  24. <constraint xsi:type="foreign" referenceId="CAT_URL_REWRITE_PRD_CTGR_CTGR_ID_CAT_CTGR_ENTT_ENTT_ID"
  25. table="catalog_url_rewrite_product_category" column="category_id"
  26. referenceTable="catalog_category_entity" referenceColumn="entity_id" onDelete="CASCADE"/>
  27. <index referenceId="CATALOG_URL_REWRITE_PRODUCT_CATEGORY_CATEGORY_ID_PRODUCT_ID" indexType="btree">
  28. <column name="category_id"/>
  29. <column name="product_id"/>
  30. </index>
  31. </table>
  32. </schema>