<?xml version="1.0"?>
<schema xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Setup/Declaration/Schema/etc/db_schema.xsd">
    <table name="recomendador_tallas_medidas" resource="default" engine="innodb" comment="Tabla para guardar medidas de productos">
        <column xsi:type="int" name="id" padding="10" unsigned="true" nullable="false" identity="true" comment="ID"/>
        <column xsi:type="varchar" name="sku" length="255" nullable="false" comment="SKU del producto"/>
        <column xsi:type="varchar" name="familia" length="255" nullable="false" comment="Familia"/>
        <column xsi:type="text" name="medidas" nullable="true" comment="Datos de medidas en formato JSON"/>

        <constraint xsi:type="primary" referenceId="PRIMARY">
            <column name="id"/>
        </constraint>

        <constraint xsi:type="unique" referenceId="RECOMENDADOR_TALLAS_MEDIDAS_SKU_UNIQUE">
            <column name="sku"/>
        </constraint>
    </table>
</schema>