db_schema.xml 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  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="url_rewrite" resource="default" engine="innodb" comment="Url Rewrites">
  11. <column xsi:type="int" name="url_rewrite_id" padding="10" unsigned="true" nullable="false" identity="true"
  12. comment="Rewrite Id"/>
  13. <column xsi:type="varchar" name="entity_type" nullable="false" length="32" comment="Entity type code"/>
  14. <column xsi:type="int" name="entity_id" padding="10" unsigned="true" nullable="false" identity="false"
  15. comment="Entity ID"/>
  16. <column xsi:type="varchar" name="request_path" nullable="true" length="255" comment="Request Path"/>
  17. <column xsi:type="varchar" name="target_path" nullable="true" length="255" comment="Target Path"/>
  18. <column xsi:type="smallint" name="redirect_type" padding="5" unsigned="true" nullable="false" identity="false"
  19. default="0" comment="Redirect Type"/>
  20. <column xsi:type="smallint" name="store_id" padding="5" unsigned="true" nullable="false" identity="false"
  21. comment="Store Id"/>
  22. <column xsi:type="varchar" name="description" nullable="true" length="255" comment="Description"/>
  23. <column xsi:type="smallint" name="is_autogenerated" padding="5" unsigned="true" nullable="false"
  24. identity="false" default="0" comment="Is rewrite generated automatically flag"/>
  25. <column xsi:type="varchar" name="metadata" nullable="true" length="255" comment="Meta data for url rewrite"/>
  26. <constraint xsi:type="primary" referenceId="PRIMARY">
  27. <column name="url_rewrite_id"/>
  28. </constraint>
  29. <constraint xsi:type="unique" referenceId="URL_REWRITE_REQUEST_PATH_STORE_ID">
  30. <column name="request_path"/>
  31. <column name="store_id"/>
  32. </constraint>
  33. <index referenceId="URL_REWRITE_TARGET_PATH" indexType="btree">
  34. <column name="target_path"/>
  35. </index>
  36. <index referenceId="URL_REWRITE_STORE_ID_ENTITY_ID" indexType="btree">
  37. <column name="store_id"/>
  38. <column name="entity_id"/>
  39. </index>
  40. </table>
  41. </schema>