db_schema.xml 2.0 KB

123456789101112131415161718192021222324252627282930313233
  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_product_entity_media_gallery_value_video" resource="default" engine="innodb"
  11. comment="Catalog Product Video Table">
  12. <column xsi:type="int" name="value_id" padding="10" unsigned="true" nullable="false" identity="false"
  13. comment="Media Entity ID"/>
  14. <column xsi:type="smallint" name="store_id" padding="5" unsigned="true" nullable="false" identity="false"
  15. default="0" comment="Store ID"/>
  16. <column xsi:type="varchar" name="provider" nullable="true" length="32" comment="Video provider ID"/>
  17. <column xsi:type="text" name="url" nullable="true" comment="Video URL"/>
  18. <column xsi:type="varchar" name="title" nullable="true" length="255" comment="Title"/>
  19. <column xsi:type="text" name="description" nullable="true" comment="Page Meta Description"/>
  20. <column xsi:type="text" name="metadata" nullable="true" comment="Video meta data"/>
  21. <constraint xsi:type="foreign" referenceId="FK_6FDF205946906B0E653E60AA769899F8"
  22. table="catalog_product_entity_media_gallery_value_video" column="value_id"
  23. referenceTable="catalog_product_entity_media_gallery" referenceColumn="value_id"
  24. onDelete="CASCADE"/>
  25. <constraint xsi:type="foreign" referenceId="CAT_PRD_ENTT_MDA_GLR_VAL_VIDEO_STORE_ID_STORE_STORE_ID"
  26. table="catalog_product_entity_media_gallery_value_video" column="store_id" referenceTable="store"
  27. referenceColumn="store_id" onDelete="CASCADE"/>
  28. <constraint xsi:type="unique" referenceId="CAT_PRD_ENTT_MDA_GLR_VAL_VIDEO_VAL_ID_STORE_ID">
  29. <column name="value_id"/>
  30. <column name="store_id"/>
  31. </constraint>
  32. </table>
  33. </schema>