<?xml version="1.0"?>
<schema xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Setup/Declaration/Schema/etc/schema.xsd">
    <table name="mageworx_shippingrules" resource="default" engine="innodb" comment="Shippingrules">
        <column xsi:type="int" name="rule_id" padding="10" unsigned="true" nullable="false" identity="true" comment="Rule Id"/>
        <column xsi:type="varchar" name="name" nullable="true" length="255" comment="Name"/>
        <column xsi:type="text" name="description" nullable="true" comment="Description"/>
        <column xsi:type="date" name="from_date" comment="From"/>
        <column xsi:type="date" name="to_date" comment="To"/>
        <column xsi:type="text" name="days_of_week" nullable="true" comment="Days of Week (Available On)"/>
        <column xsi:type="smallint" name="is_active" padding="6" unsigned="false" nullable="false" identity="false" default="0" comment="Is Active"/>
        <column xsi:type="mediumtext" name="conditions_serialized" nullable="true" comment="Conditions Serialized"/>
        <column xsi:type="mediumtext" name="actions_serialized" nullable="true" comment="Actions Serialized"/>
        <column xsi:type="smallint" name="stop_rules_processing" padding="6" unsigned="false" nullable="false" identity="false" default="1" comment="Stop Rules Processing"/>
        <column xsi:type="text" name="shipping_methods" nullable="true" comment="Shipping Methods"/>
        <column xsi:type="text" name="disabled_shipping_methods" nullable="true" comment="Disabled Shipping Methods"/>
        <column xsi:type="text" name="enabled_shipping_methods" nullable="true" comment="Enabled Shipping Methods"/>
        <column xsi:type="int" name="sort_order" padding="10" unsigned="true" nullable="false" identity="false" default="0" comment="Sort Order (Priority)"/>
        <column xsi:type="text" name="action_type" nullable="true" comment="Action Type"/>
        <column xsi:type="text" name="simple_action" nullable="true" comment="Simple Action"/>
        <column xsi:type="mediumtext" name="amount" nullable="true" comment="Amount"/>
        <column xsi:type="int" name="time_from" padding="11" unsigned="false" nullable="true" identity="false" comment="Time From"/>
        <column xsi:type="int" name="time_to" padding="11" unsigned="false" nullable="true" identity="false" comment="Time To"/>
        <column xsi:type="smallint" name="use_time" padding="6" unsigned="false" nullable="true" identity="false" comment="Use or not time flag"/>
        <column xsi:type="smallint" name="time_enabled" padding="6" unsigned="false" nullable="true" identity="false" comment="Time Range is enabled or disabled time"/>
        <column xsi:type="smallint" name="display_error_message" padding="6" unsigned="false" nullable="true" identity="false" default="0" comment="Display or not the disabled methods error message"/>
        <column xsi:type="varchar" name="error_message" nullable="true" length="255" comment="Disabled methods error message"/>
        <column xsi:type="text" name="store_errmsgs" nullable="true" comment="Store Specific Error Messages (serialized)"/>
        <column xsi:type="mediumtext" name="changed_titles" nullable="true" comment="Shipping Methods Changed Titles"/>
        <column xsi:type="text" name="min_price_shipping_methods" nullable="false" comment="Shipping Methods Which will be affected by min-price action"/>
        <column xsi:type="boolean" name="display_all_methods_having_min_price" nullable="false" default="true" comment="If enabled, all shipping methods with the same min price will be shown."/>
        <constraint xsi:type="primary" referenceId="PRIMARY">
            <column name="rule_id"/>
        </constraint>
        <index referenceId="MAGEWORX_SHIPPINGRULES_IS_ACTIVE_SORT_ORDER_TO_DATE_FROM_DATE" indexType="btree">
            <column name="is_active"/>
            <column name="sort_order"/>
            <column name="to_date"/>
            <column name="from_date"/>
        </index>
    </table>
    <table name="mageworx_shippingrules_store" resource="default" engine="innodb" comment="MageWorx Shipping Rules To Stores Relations">
        <column xsi:type="int" name="rule_id" padding="10" unsigned="true" nullable="false" identity="false" comment="Rule Id"/>
        <column xsi:type="smallint" name="store_id" padding="5" unsigned="true" nullable="false" identity="false" comment="Store View Id"/>
        <constraint xsi:type="primary" referenceId="PRIMARY">
            <column name="rule_id"/>
            <column name="store_id"/>
        </constraint>
        <constraint xsi:type="foreign" referenceId="MAGEWORX_SHPPRULES_STORE_RULE_ID_MAGEWORX_SHPPRULES_RULE_ID" table="mageworx_shippingrules_store" column="rule_id" referenceTable="mageworx_shippingrules" referenceColumn="rule_id" onDelete="CASCADE"/>
        <constraint xsi:type="foreign" referenceId="MAGEWORX_SHIPPINGRULES_STORE_STORE_ID_STORE_STORE_ID" table="mageworx_shippingrules_store" column="store_id" referenceTable="store" referenceColumn="store_id" onDelete="CASCADE"/>
        <index referenceId="MAGEWORX_SHIPPINGRULES_STORE_STORE_ID" indexType="btree">
            <column name="store_id"/>
        </index>
    </table>
    <table name="mageworx_shippingrules_customer_group" resource="default" engine="innodb" comment="MageWorx Shipping Rules To Customer Groups Relations">
        <column xsi:type="int" name="rule_id" padding="10" unsigned="true" nullable="false" identity="false" comment="Rule Id"/>
        <column xsi:type="int" name="customer_group_id" padding="10" unsigned="true" nullable="false" identity="false" comment="Customer Group Id"/>
        <constraint xsi:type="primary" referenceId="PRIMARY">
            <column name="rule_id"/>
            <column name="customer_group_id"/>
        </constraint>
        <constraint xsi:type="foreign" referenceId="MAGEWORX_SHPPRULES_CSTR_GROUP_RULE_ID_MAGEWORX_SHPPRULES_RULE_ID" table="mageworx_shippingrules_customer_group" column="rule_id" referenceTable="mageworx_shippingrules" referenceColumn="rule_id" onDelete="CASCADE"/>
        <constraint xsi:type="foreign" referenceId="FK_9B03D94DEF68FED61E6DEF8F3BF0C117" table="mageworx_shippingrules_customer_group" column="customer_group_id" referenceTable="customer_group" referenceColumn="customer_group_id" onDelete="CASCADE"/>
        <index referenceId="MAGEWORX_SHIPPINGRULES_CUSTOMER_GROUP_CUSTOMER_GROUP_ID" indexType="btree">
            <column name="customer_group_id"/>
        </index>
    </table>
    <table name="mageworx_shippingrules_carrier" resource="default" engine="innodb" comment="Artificial Carriers Table">
        <column xsi:type="int" name="carrier_id" padding="10" unsigned="true" nullable="false" identity="true" comment="Id"/>
        <column xsi:type="varchar" name="carrier_code" nullable="true" length="64" comment="Carrier Code"/>
        <column xsi:type="smallint" name="active" padding="6" unsigned="false" nullable="false" identity="false" default="0" comment="Is Active"/>
        <column xsi:type="smallint" name="sallowspecific" padding="6" unsigned="false" nullable="false" identity="false" default="0" comment="sallowspecific"/>
        <column xsi:type="varchar" name="model" nullable="true" length="47" default="MageWorx\\ShippingRules\\Model\\Carrier\\Artificial" comment="Corresponding Model"/>
        <column xsi:type="text" name="name" nullable="true" comment="Carrier Name"/>
        <column xsi:type="text" name="title" nullable="true" comment="Carrier Title"/>
        <column xsi:type="text" name="type" nullable="true" comment="Carrier Type"/>
        <column xsi:type="text" name="specificerrmsg" nullable="true" comment="Carrier Error Message"/>
        <column xsi:type="decimal" name="price" scale="2" precision="12" unsigned="false" nullable="true" comment="Default Price"/>
        <column xsi:type="timestamp" name="created_at" on_update="false" nullable="false" default="CURRENT_TIMESTAMP" comment="Creation Time"/>
        <column xsi:type="timestamp" name="updated_at" on_update="true" nullable="false" default="CURRENT_TIMESTAMP" comment="Update Time"/>
        <column xsi:type="int" name="sort_order" padding="10" unsigned="true" nullable="false" identity="false" default="0" comment="Sort Order"/>
        <constraint xsi:type="primary" referenceId="PRIMARY">
            <column name="carrier_id"/>
        </constraint>
        <constraint xsi:type="unique" referenceId="MAGEWORX_SHIPPINGRULES_CARRIER_CARRIER_CODE_UNIQUE">
            <column name="carrier_code"/>
        </constraint>
        <index referenceId="MAGEWORX_SHIPPINGRULES_CARRIER_CARRIER_ID" indexType="btree">
            <column name="carrier_id"/>
        </index>
    </table>
    <table name="mageworx_shippingrules_methods" resource="default" engine="innodb" comment="Artificial Carriers Methods Table">
        <column xsi:type="int" name="entity_id" padding="10" unsigned="true" nullable="false" identity="true" comment="Id"/>
        <column xsi:type="varchar" name="code" nullable="true" length="64" comment="Method Code"/>
        <column xsi:type="int" name="carrier_id" disabled="true" padding="10" unsigned="true" nullable="false" identity="false" comment="Carrier ID"/>
        <column xsi:type="smallint" name="active" padding="6" unsigned="false" nullable="false" identity="false" default="0" comment="Is Active"/>
        <column xsi:type="text" name="title" nullable="true" comment="Method Title"/>
        <column xsi:type="decimal" name="price" scale="4" precision="14" unsigned="false" nullable="true"/>
        <column xsi:type="decimal" name="cost" scale="4" precision="14" unsigned="false" nullable="true"/>
        <column xsi:type="timestamp" name="created_at" on_update="false" nullable="false" default="CURRENT_TIMESTAMP" comment="Creation Time"/>
        <column xsi:type="timestamp" name="updated_at" on_update="true" nullable="false" default="CURRENT_TIMESTAMP" comment="Update Time"/>
        <column xsi:type="smallint" name="disabled_without_valid_rates" padding="6" unsigned="false" nullable="true" identity="false" comment="Method without any valid rate should be disabled"/>
        <column xsi:type="decimal" name="max_price_threshold" scale="4" precision="14" unsigned="false" nullable="true"/>
        <column xsi:type="decimal" name="min_price_threshold" scale="4" precision="14" unsigned="false" nullable="true"/>
        <column xsi:type="boolean" name="ignore_virtual_products_price" nullable="false" default="false" comment="Ignore price of virtual products in cart"/>
        <column xsi:type="boolean" name="use_price_with_discount" nullable="false" default="false" comment="Use subtotal with discount in price condition of the Rate"/>
        <column xsi:type="smallint" name="multiple_rates_price" padding="6" unsigned="false" nullable="true" identity="false" comment="Multiple Rates price calculation type"/>
        <column xsi:type="smallint" name="replaceable_title" padding="6" unsigned="false" nullable="false" identity="false" default="1" comment="Replace title from valid rate"/>
        <column xsi:type="text" name="description" nullable="true" comment="Method description"/>
        <column xsi:type="smallint" name="show_description" padding="6" unsigned="false" nullable="false" identity="false" default="0" comment="Show description on the frontend flag"/>
        <column xsi:type="varchar" name="image" nullable="true" length="255" comment="Method image"/>
        <column xsi:type="smallint" name="show_image" padding="6" unsigned="false" nullable="false" identity="false" default="0" comment="Show image on the frontend flag"/>
        <column xsi:type="smallint" name="replaceable_estimated_delivery_time" padding="6" unsigned="false" nullable="false" identity="false" default="1" comment="Replace Estimated delivery time from a valid rate"/>
        <column xsi:type="decimal" name="estimated_delivery_time_min" scale="2" precision="12" unsigned="false" nullable="true" comment="Estimated delivery time Min"/>
        <column xsi:type="decimal" name="estimated_delivery_time_max" scale="2" precision="12" unsigned="false" nullable="true" comment="Estimated delivery time Max"/>
        <column xsi:type="smallint" name="estimated_delivery_time_display_type" padding="6" unsigned="false" nullable="false" identity="false" default="0" comment="Estimated delivery time data type: Days or Hours"/>
        <column xsi:type="varchar" name="estimated_delivery_time_message" nullable="true" length="255" comment="Estimated delivery time message to display on front-end"/>
        <column xsi:type="smallint" name="show_estimated_delivery_time" padding="6" unsigned="false" nullable="false" identity="false" default="0" comment="Show estimated delivery time on the frontend flag"/>
        <column xsi:type="smallint" name="allow_free_shipping" padding="6" unsigned="false" nullable="false" identity="false" default="0" comment="Allow Free Shipping flag (by third-party modules as sales rule)"/>
        <column xsi:type="varchar" name="carrier_code" nullable="false" length="64" comment="Carrier Code (relation)"/>
        <constraint xsi:type="primary" referenceId="PRIMARY">
            <column name="entity_id"/>
        </constraint>
        <constraint xsi:type="foreign" referenceId="FK_FF3D4D185B8A995076178CCAB9C4DBC0" disabled="true" table="mageworx_shippingrules_methods" column="carrier_id" referenceTable="mageworx_shippingrules_carrier" referenceColumn="carrier_id" onDelete="CASCADE"/>
        <constraint xsi:type="foreign" referenceId="FK_BB67FE8B044EF3B3B15D1E0DD3C2668E" table="mageworx_shippingrules_methods" column="carrier_code" referenceTable="mageworx_shippingrules_carrier" referenceColumn="carrier_code" onDelete="CASCADE"/>
        <constraint xsi:type="unique" referenceId="MAGEWORX_SHIPPINGRULES_METHODS_ENTITY_ID_CODE_CARRIER_ID" disabled="true">
            <column name="entity_id"/>
            <column name="code"/>
            <column name="carrier_id"/>
        </constraint>
        <constraint xsi:type="unique" referenceId="MAGEWORX_SHIPPINGRULES_METHODS_CODE_CARRIER_CODE">
            <column name="code"/>
            <column name="carrier_code"/>
        </constraint>
        <index referenceId="MAGEWORX_SHIPPINGRULES_METHODS_ENTITY_ID" indexType="btree">
            <column name="entity_id"/>
        </index>
        <index referenceId="MAGEWORX_SHIPPINGRULES_METHODS_CODE" indexType="btree">
            <column name="code"/>
        </index>
        <index referenceId="MAGEWORX_SHIPPINGRULES_METHODS_CARRIER_ID" indexType="btree" disabled="true">
            <column name="carrier_id"/>
        </index>
    </table>
    <table name="mageworx_shippingrules_carrier_label" resource="default" engine="innodb" comment="MageWorx Shipping Rules Carrier Label">
        <column xsi:type="int" name="label_id" padding="10" unsigned="true" nullable="false" identity="true" comment="Label Id"/>
        <column xsi:type="int" name="carrier_id" padding="10" unsigned="true" nullable="false" identity="false" comment="Carrier Id"/>
        <column xsi:type="smallint" name="store_id" padding="5" unsigned="true" nullable="false" identity="false" comment="Store Id"/>
        <column xsi:type="varchar" name="label" nullable="true" length="255" comment="Label"/>
        <constraint xsi:type="primary" referenceId="PRIMARY">
            <column name="label_id"/>
        </constraint>
        <constraint xsi:type="foreign" referenceId="FK_5CB5F5698DC3800C85BAF92DBF744485" table="mageworx_shippingrules_carrier_label" column="carrier_id" referenceTable="mageworx_shippingrules_carrier" referenceColumn="carrier_id" onDelete="CASCADE"/>
        <constraint xsi:type="foreign" referenceId="MAGEWORX_SHIPPINGRULES_CARRIER_LABEL_STORE_ID_STORE_STORE_ID" table="mageworx_shippingrules_carrier_label" column="store_id" referenceTable="store" referenceColumn="store_id" onDelete="CASCADE"/>
        <constraint xsi:type="unique" referenceId="MAGEWORX_SHIPPINGRULES_CARRIER_LABEL_CARRIER_ID_STORE_ID">
            <column name="carrier_id"/>
            <column name="store_id"/>
        </constraint>
        <index referenceId="MAGEWORX_SHIPPINGRULES_CARRIER_LABEL_STORE_ID" indexType="btree">
            <column name="store_id"/>
        </index>
    </table>
    <table name="mageworx_shippingrules_methods_label" resource="default" engine="innodb" comment="MageWorx Shipping Rules Method Label">
        <column xsi:type="int" name="label_id" padding="10" unsigned="true" nullable="false" identity="true" comment="Label Id"/>
        <column xsi:type="int" name="method_id" padding="10" unsigned="true" nullable="false" identity="false" comment="Method Id"/>
        <column xsi:type="smallint" name="store_id" padding="5" unsigned="true" nullable="false" identity="false" comment="Store Id"/>
        <column xsi:type="varchar" name="label" nullable="true" length="255" comment="Label"/>
        <constraint xsi:type="primary" referenceId="PRIMARY">
            <column name="label_id"/>
        </constraint>
        <constraint xsi:type="foreign" referenceId="FK_C91E0C78029DE8FF286E437CDA63694F" table="mageworx_shippingrules_methods_label" column="method_id" referenceTable="mageworx_shippingrules_methods" referenceColumn="entity_id" onDelete="CASCADE"/>
        <constraint xsi:type="foreign" referenceId="MAGEWORX_SHIPPINGRULES_METHODS_LABEL_STORE_ID_STORE_STORE_ID" table="mageworx_shippingrules_methods_label" column="store_id" referenceTable="store" referenceColumn="store_id" onDelete="CASCADE"/>
        <constraint xsi:type="unique" referenceId="MAGEWORX_SHIPPINGRULES_METHODS_LABEL_METHOD_ID_STORE_ID">
            <column name="method_id"/>
            <column name="store_id"/>
        </constraint>
        <index referenceId="MAGEWORX_SHIPPINGRULES_METHODS_LABEL_STORE_ID" indexType="btree">
            <column name="store_id"/>
        </index>
    </table>
    <table name="mageworx_shippingrules_rates_label" resource="default" engine="innodb" comment="MageWorx Shipping Rules Rate Labels">
        <column xsi:type="int" name="label_id" padding="10" unsigned="true" nullable="false" identity="true" comment="Label Id"/>
        <column xsi:type="int" name="rate_id" padding="10" unsigned="true" nullable="false" identity="false" comment="Rate Id"/>
        <column xsi:type="smallint" name="store_id" padding="5" unsigned="true" nullable="false" identity="false" comment="Store Id"/>
        <column xsi:type="varchar" name="label" nullable="true" length="255" comment="Label"/>
        <constraint xsi:type="primary" referenceId="PRIMARY">
            <column name="label_id"/>
        </constraint>
        <constraint xsi:type="foreign" referenceId="FK_5FB101362556A17015F9AA5FFF0667B5" table="mageworx_shippingrules_rates_label" column="rate_id" referenceTable="mageworx_shippingrules_rates" referenceColumn="rate_id" onDelete="CASCADE"/>
        <constraint xsi:type="foreign" referenceId="MAGEWORX_SHIPPINGRULES_RATES_LABEL_STORE_ID_STORE_STORE_ID" table="mageworx_shippingrules_rates_label" column="store_id" referenceTable="store" referenceColumn="store_id" onDelete="CASCADE"/>
        <constraint xsi:type="unique" referenceId="MAGEWORX_SHIPPINGRULES_RATES_LABEL_RATE_ID_STORE_ID">
            <column name="rate_id"/>
            <column name="store_id"/>
        </constraint>
        <index referenceId="MAGEWORX_SHIPPINGRULES_RATES_LABEL_STORE_ID" indexType="btree">
            <column name="store_id"/>
        </index>
    </table>
    <table name="mageworx_shippingrules_rates" resource="default" engine="innodb" comment="Method Rates Table">
        <column xsi:type="int" name="rate_id" padding="10" unsigned="true" nullable="false" identity="true" comment="Id"/>
        <column xsi:type="int" name="method_id" disabled="true" padding="10" unsigned="true" nullable="false" identity="false" comment="Corresponding Method ID"/>
        <column xsi:type="int" name="priority" padding="11" unsigned="false" nullable="false" identity="false" default="0" comment="Priority"/>
        <column xsi:type="smallint" name="active" padding="6" unsigned="false" nullable="false" identity="false" default="0" comment="Is Active"/>
        <column xsi:type="smallint" name="rate_method_price" padding="6" unsigned="false" nullable="false" identity="false" default="0" comment="Rate price calculation type"/>
        <column xsi:type="text" name="title" nullable="true" comment="Rate Title"/>
        <column xsi:type="text" name="country_id" disabled="true" nullable="true" onCreate="migrateDataFrom(country_id)"/>
        <column xsi:type="text" name="region" disabled="true" nullable="true" onCreate="migrateDataFrom(region)"/>
        <column xsi:type="text" name="region_id" disabled="true" nullable="true" onCreate="migrateDataFrom(region_id)"/>
        <column xsi:type="varchar" name="zip_from" disabled="true" nullable="true" length="255" comment="Zip/Postal Code From"/>
        <column xsi:type="varchar" name="zip_to" disabled="true" nullable="true" length="255" comment="Zip/Postal Code To"/>
        <column xsi:type="decimal" name="price_from" scale="4" precision="14" unsigned="false" nullable="true"/>
        <column xsi:type="decimal" name="price_to" scale="4" precision="14" unsigned="false" nullable="true"/>
        <column xsi:type="decimal" name="qty_from" scale="4" precision="14" unsigned="false" nullable="true"/>
        <column xsi:type="decimal" name="qty_to" scale="4" precision="14" unsigned="false" nullable="true"/>
        <column xsi:type="decimal" name="weight_from" scale="4" precision="14" unsigned="false" nullable="true"/>
        <column xsi:type="decimal" name="weight_to" scale="4" precision="14" unsigned="false" nullable="true"/>
        <column xsi:type="decimal" name="price" scale="4" precision="14" unsigned="false" nullable="true"/>
        <column xsi:type="decimal" name="price_per_product" scale="4" precision="14" unsigned="false" nullable="true"/>
        <column xsi:type="decimal" name="price_per_item" scale="4" precision="14" unsigned="false" nullable="true"/>
        <column xsi:type="decimal" name="price_percent_per_product" scale="4" precision="14" unsigned="false" nullable="true"/>
        <column xsi:type="decimal" name="price_percent_per_item" scale="4" precision="14" unsigned="false" nullable="true"/>
        <column xsi:type="decimal" name="item_price_percent" scale="4" precision="14" unsigned="false" nullable="true"/>
        <column xsi:type="decimal" name="price_per_weight" scale="4" precision="14" unsigned="false" nullable="true"/>
        <column xsi:type="timestamp" name="created_at" on_update="false" nullable="false" default="CURRENT_TIMESTAMP" comment="Creation Time"/>
        <column xsi:type="timestamp" name="updated_at" on_update="true" nullable="false" default="CURRENT_TIMESTAMP" comment="Update Time"/>
        <column xsi:type="decimal" name="estimated_delivery_time_min" scale="2" precision="12" unsigned="false" nullable="true" comment="Estimated delivery time Min"/>
        <column xsi:type="decimal" name="estimated_delivery_time_max" scale="2" precision="12" unsigned="false" nullable="true" comment="Estimated delivery time Max"/>
        <column xsi:type="varchar" name="method_code" nullable="false" length="64" comment="Method Code (relation)"/>
        <column xsi:type="varchar" name="rate_code" nullable="true" length="64" comment="Rate Code"/>
        <column xsi:type="varchar" name="zip_format" nullable="false" length="32" default="numeric" comment="Zip Code Format"/>
        <column xsi:type="int" name="zip_validation_mode" padding="2" unsigned="false" nullable="false" identity="false" default="0" comment="Zip Validation Mode"/>
        <constraint xsi:type="primary" referenceId="PRIMARY">
            <column name="rate_id"/>
        </constraint>
        <constraint xsi:type="foreign" referenceId="FK_7B64B927582C4370598CEEF3399F1C4D" disabled="true" table="mageworx_shippingrules_rates" column="method_id" referenceTable="mageworx_shippingrules_methods" referenceColumn="entity_id" onDelete="CASCADE"/>
        <constraint xsi:type="foreign" referenceId="FK_E1961EF89461BD2F33816CBAF777F7BA" table="mageworx_shippingrules_rates" column="method_code" referenceTable="mageworx_shippingrules_methods" referenceColumn="code" onDelete="CASCADE"/>
        <constraint xsi:type="unique" referenceId="MAGEWORX_SHIPPINGRULES_RATES_RATE_ID_METHOD_ID" disabled="true">
            <column name="rate_id"/>
            <column name="method_id"/>
        </constraint>
        <constraint xsi:type="unique" referenceId="MAGEWORX_SHIPPINGRULES_RATES_RATE_CODE">
            <column name="rate_code"/>
        </constraint>
        <index referenceId="MAGEWORX_SHIPPINGRULES_RATES_RATE_ID" indexType="btree">
            <column name="rate_id"/>
        </index>
        <index referenceId="MAGEWORX_SHIPPINGRULES_RATES_METHOD_ID" indexType="btree" disabled="true">
            <column name="method_id"/>
        </index>
    </table>
    <table name="mageworx_shippingrules_zone" resource="default" engine="innodb" comment="Zones Table">
        <column xsi:type="int" name="entity_id" padding="10" unsigned="true" nullable="false" identity="true" comment="Id"/>
        <column xsi:type="int" name="priority" padding="11" unsigned="false" nullable="false" identity="false" default="0" comment="Priority"/>
        <column xsi:type="int" name="is_active" padding="11" unsigned="false" nullable="false" identity="false" default="0" comment="Is Active"/>
        <column xsi:type="varchar" name="name" nullable="true" length="255" comment="Name"/>
        <column xsi:type="text" name="description" nullable="true" comment="Description"/>
        <column xsi:type="mediumtext" name="conditions_serialized" nullable="true" comment="Conditions Serialized"/>
        <column xsi:type="varchar" name="default_shipping_method" nullable="true" length="255" comment="Default Shipping Method"/>
        <column xsi:type="timestamp" name="created_at" on_update="false" nullable="false" default="CURRENT_TIMESTAMP" comment="Creation Time"/>
        <column xsi:type="timestamp" name="updated_at" on_update="true" nullable="false" default="CURRENT_TIMESTAMP" comment="Update Time"/>
        <constraint xsi:type="primary" referenceId="PRIMARY">
            <column name="entity_id"/>
        </constraint>
        <index referenceId="MAGEWORX_SHIPPINGRULES_ZONE_ENTITY_ID" indexType="btree">
            <column name="entity_id"/>
        </index>
    </table>
    <table name="mageworx_shippingrules_zone_store" resource="default" engine="innodb" comment="MageWorx Shipping Zones To Stores Relations">
        <column xsi:type="int" name="zone_id" padding="10" unsigned="true" nullable="false" identity="false" comment="Zone Id"/>
        <column xsi:type="smallint" name="store_id" padding="5" unsigned="true" nullable="false" identity="false" comment="Store View Id"/>
        <constraint xsi:type="primary" referenceId="PRIMARY">
            <column name="zone_id"/>
            <column name="store_id"/>
        </constraint>
        <constraint xsi:type="foreign" referenceId="FK_2274E462724480C9EE0A77F075BBA545" table="mageworx_shippingrules_zone_store" column="zone_id" referenceTable="mageworx_shippingrules_zone" referenceColumn="entity_id" onDelete="CASCADE"/>
        <constraint xsi:type="foreign" referenceId="MAGEWORX_SHIPPINGRULES_ZONE_STORE_STORE_ID_STORE_STORE_ID" table="mageworx_shippingrules_zone_store" column="store_id" referenceTable="store" referenceColumn="store_id" onDelete="CASCADE"/>
        <index referenceId="MAGEWORX_SHIPPINGRULES_ZONE_STORE_STORE_ID" indexType="btree">
            <column name="store_id"/>
        </index>
    </table>
    <table name="mageworx_shippingrules_extended_regions" resource="default" engine="innodb" comment="MageWorx Shipping Suite: Extended Regions Data Table">
        <column xsi:type="int" name="region_id" padding="10" unsigned="true" nullable="false" identity="false" comment="Region Id"/>
        <column xsi:type="int" name="is_active" padding="11" unsigned="false" nullable="false" identity="false" default="0" comment="Is Active"/>
        <column xsi:type="int" name="is_custom" padding="11" unsigned="false" nullable="false" identity="false" default="0" comment="Custom Region created using module"/>
        <constraint xsi:type="primary" referenceId="PRIMARY">
            <column name="region_id"/>
        </constraint>
        <constraint xsi:type="foreign" referenceId="FK_138DA0B3C4EDF5F7E5EFC05453029B68" table="mageworx_shippingrules_extended_regions" column="region_id" referenceTable="directory_country_region" referenceColumn="region_id" onDelete="CASCADE"/>
    </table>
    <table name="mageworx_shippingrules_extended_zone" resource="default" engine="innodb" comment="Zones Table">
        <column xsi:type="int" name="entity_id" padding="10" unsigned="true" nullable="false" identity="true" comment="Id"/>
        <column xsi:type="int" name="priority" padding="11" unsigned="false" nullable="false" identity="false" default="0" comment="Priority (Sort Order)"/>
        <column xsi:type="int" name="is_active" padding="11" unsigned="false" nullable="false" identity="false" default="0" comment="Is Active"/>
        <column xsi:type="varchar" name="name" nullable="true" length="255" comment="Name"/>
        <column xsi:type="text" name="description" nullable="true" comment="Description"/>
        <column xsi:type="varchar" name="image" nullable="true" length="255" comment="Image"/>
        <column xsi:type="text" name="countries_id" nullable="false" comment="Countries"/>
        <column xsi:type="timestamp" name="created_at" on_update="false" nullable="false" default="CURRENT_TIMESTAMP" comment="Creation Time"/>
        <column xsi:type="timestamp" name="updated_at" on_update="true" nullable="false" default="CURRENT_TIMESTAMP" comment="Update Time"/>
        <constraint xsi:type="primary" referenceId="PRIMARY">
            <column name="entity_id"/>
        </constraint>
        <constraint xsi:type="unique" referenceId="MAGEWORX_SHIPPINGRULES_EXTENDED_ZONE_NAME">
            <column name="name"/>
        </constraint>
        <index referenceId="MAGEWORX_SHIPPINGRULES_EXTENDED_ZONE_ENTITY_ID" indexType="btree">
            <column name="entity_id"/>
        </index>
    </table>
    <table name="mageworx_shippingrules_extended_zone_store" resource="default" engine="innodb" comment="MageWorx Pop-up Zones To Stores Relations">
        <column xsi:type="int" name="zone_id" padding="10" unsigned="true" nullable="false" identity="false" comment="Pop-up Zone Id"/>
        <column xsi:type="smallint" name="store_id" padding="5" unsigned="true" nullable="false" identity="false" comment="Store View Id"/>
        <constraint xsi:type="primary" referenceId="PRIMARY">
            <column name="zone_id"/>
            <column name="store_id"/>
        </constraint>
        <constraint xsi:type="foreign" referenceId="FK_C490BA33012FB4789D657FD24B4263B6" table="mageworx_shippingrules_extended_zone_store" column="zone_id" referenceTable="mageworx_shippingrules_extended_zone" referenceColumn="entity_id" onDelete="CASCADE"/>
        <constraint xsi:type="foreign" referenceId="MAGEWORX_SHPPRULES_EXTENDED_ZONE_STORE_STORE_ID_STORE_STORE_ID" table="mageworx_shippingrules_extended_zone_store" column="store_id" referenceTable="store" referenceColumn="store_id" onDelete="CASCADE"/>
        <index referenceId="MAGEWORX_SHIPPINGRULES_EXTENDED_ZONE_STORE_STORE_ID" indexType="btree">
            <column name="store_id"/>
        </index>
    </table>
    <table name="mageworx_shippingrules_extended_zone_labels" resource="default" engine="innodb" comment="MageWorx Shipping Rules Pop-up Zones Label">
        <column xsi:type="int" name="label_id" padding="10" unsigned="true" nullable="false" identity="true" comment="Label Id"/>
        <column xsi:type="int" name="zone_id" padding="10" unsigned="true" nullable="false" identity="false" comment="Zone Id"/>
        <column xsi:type="smallint" name="store_id" padding="5" unsigned="true" nullable="false" identity="false" comment="Store Id"/>
        <column xsi:type="varchar" name="label" nullable="true" length="255" comment="Label"/>
        <constraint xsi:type="primary" referenceId="PRIMARY">
            <column name="label_id"/>
        </constraint>
        <constraint xsi:type="foreign" referenceId="FK_CDDB3B09AD4CF22C93AD0C468A82B223" table="mageworx_shippingrules_extended_zone_labels" column="zone_id" referenceTable="mageworx_shippingrules_extended_zone" referenceColumn="entity_id" onDelete="CASCADE"/>
        <constraint xsi:type="foreign" referenceId="MAGEWORX_SHPPRULES_EXTENDED_ZONE_LBLS_STORE_ID_STORE_STORE_ID" table="mageworx_shippingrules_extended_zone_labels" column="store_id" referenceTable="store" referenceColumn="store_id" onDelete="CASCADE"/>
        <constraint xsi:type="unique" referenceId="MAGEWORX_SHIPPINGRULES_EXTENDED_ZONE_LABELS_ZONE_ID_STORE_ID">
            <column name="zone_id"/>
            <column name="store_id"/>
        </constraint>
        <index referenceId="MAGEWORX_SHIPPINGRULES_EXTENDED_ZONE_LABELS_STORE_ID" indexType="btree">
            <column name="store_id"/>
        </index>
    </table>
    <table name="mageworx_shippingrules_method_edt_store_specific_message" resource="default" engine="innodb" comment="MageWorx Shipping Rules Estimated Delivery Time store specific message">
        <column xsi:type="int" name="message_id" padding="10" unsigned="true" nullable="false" identity="true" comment="Label Id"/>
        <column xsi:type="int" name="method_id" padding="10" unsigned="true" nullable="false" identity="false" comment="Method Id"/>
        <column xsi:type="smallint" name="store_id" padding="5" unsigned="true" nullable="false" identity="false" comment="Store Id"/>
        <column xsi:type="varchar" name="message" nullable="true" length="255" comment="Message"/>
        <constraint xsi:type="primary" referenceId="PRIMARY">
            <column name="message_id"/>
        </constraint>
        <constraint xsi:type="foreign" referenceId="FK_1C71A6389129223B8E617D8C444F4156" table="mageworx_shippingrules_method_edt_store_specific_message" column="method_id" referenceTable="mageworx_shippingrules_methods" referenceColumn="entity_id" onDelete="CASCADE"/>
        <constraint xsi:type="foreign" referenceId="FK_31A76D915F4B9105F45D20EFAB45998D" table="mageworx_shippingrules_method_edt_store_specific_message" column="store_id" referenceTable="store" referenceColumn="store_id" onDelete="CASCADE"/>
        <constraint xsi:type="unique" referenceId="UNQ_6E9A553B99F1243D7F2B215C7B19114E">
            <column name="method_id"/>
            <column name="store_id"/>
        </constraint>
        <index referenceId="MAGEWORX_SHPPRULES_METHOD_EDT_STORE_SPECIFIC_MESSAGE_STORE_ID" indexType="btree">
            <column name="store_id"/>
        </index>
    </table>
    <table name="mageworx_shippingrules_carrier_store" resource="default" engine="innodb" comment="MageWorx Shipping Rules Entity To Stores Relations">
        <column xsi:type="int" name="entity_id" padding="10" unsigned="true" nullable="false" identity="false" comment="Entity Id"/>
        <column xsi:type="smallint" name="store_id" padding="5" unsigned="true" nullable="false" identity="false" comment="Store View Id"/>
        <constraint xsi:type="primary" referenceId="PRIMARY">
            <column name="entity_id"/>
            <column name="store_id"/>
        </constraint>
        <constraint xsi:type="foreign" referenceId="FK_0CD9EC57ACEE72A357C020EDCAAFA5D6" table="mageworx_shippingrules_carrier_store" column="entity_id" referenceTable="mageworx_shippingrules_carrier" referenceColumn="carrier_id" onDelete="CASCADE"/>
        <constraint xsi:type="foreign" referenceId="MAGEWORX_SHIPPINGRULES_CARRIER_STORE_STORE_ID_STORE_STORE_ID" table="mageworx_shippingrules_carrier_store" column="store_id" referenceTable="store" referenceColumn="store_id" onDelete="CASCADE"/>
        <index referenceId="MAGEWORX_SHIPPINGRULES_CARRIER_STORE_STORE_ID" indexType="btree">
            <column name="store_id"/>
        </index>
    </table>
    <table name="mageworx_shippingrules_methods_store" resource="default" engine="innodb" comment="MageWorx Shipping Rules Entity To Stores Relations">
        <column xsi:type="int" name="entity_id" padding="10" unsigned="true" nullable="false" identity="false" comment="Entity Id"/>
        <column xsi:type="smallint" name="store_id" padding="5" unsigned="true" nullable="false" identity="false" comment="Store View Id"/>
        <constraint xsi:type="primary" referenceId="PRIMARY">
            <column name="entity_id"/>
            <column name="store_id"/>
        </constraint>
        <constraint xsi:type="foreign" referenceId="FK_4DA04BD791FC9A30CAD1C7FD9BBB89EF" table="mageworx_shippingrules_methods_store" column="entity_id" referenceTable="mageworx_shippingrules_methods" referenceColumn="entity_id" onDelete="CASCADE"/>
        <constraint xsi:type="foreign" referenceId="MAGEWORX_SHIPPINGRULES_METHODS_STORE_STORE_ID_STORE_STORE_ID" table="mageworx_shippingrules_methods_store" column="store_id" referenceTable="store" referenceColumn="store_id" onDelete="CASCADE"/>
        <index referenceId="MAGEWORX_SHIPPINGRULES_METHODS_STORE_STORE_ID" indexType="btree">
            <column name="store_id"/>
        </index>
    </table>
    <table name="mageworx_shippingrules_rates_store" resource="default" engine="innodb" comment="MageWorx Shipping Rules Entity To Stores Relations">
        <column xsi:type="int" name="entity_id" padding="10" unsigned="true" nullable="false" identity="false" comment="Entity Id"/>
        <column xsi:type="smallint" name="store_id" padding="5" unsigned="true" nullable="false" identity="false" comment="Store View Id"/>
        <constraint xsi:type="primary" referenceId="PRIMARY">
            <column name="entity_id"/>
            <column name="store_id"/>
        </constraint>
        <constraint xsi:type="foreign" referenceId="FK_418629243AD087E35776BDDC6A5869A1" table="mageworx_shippingrules_rates_store" column="entity_id" referenceTable="mageworx_shippingrules_rates" referenceColumn="rate_id" onDelete="CASCADE"/>
        <constraint xsi:type="foreign" referenceId="MAGEWORX_SHIPPINGRULES_RATES_STORE_STORE_ID_STORE_STORE_ID" table="mageworx_shippingrules_rates_store" column="store_id" referenceTable="store" referenceColumn="store_id" onDelete="CASCADE"/>
        <index referenceId="MAGEWORX_SHIPPINGRULES_RATES_STORE_STORE_ID" indexType="btree">
            <column name="store_id"/>
        </index>
    </table>
    <table name="mageworx_shippingrules_rates_country" resource="default" engine="innodb" comment="MageWorx Shipping Rules Rates &amp; Countries Relations">
        <column xsi:type="int" name="rate_id" padding="10" unsigned="true" nullable="false" identity="false" comment="Rate Id"/>
        <column xsi:type="varchar" name="country_code" nullable="false" length="8" comment="Country Code"/>
        <constraint xsi:type="foreign" referenceId="FK_5A291E1902774958099959F18A63A064" table="mageworx_shippingrules_rates_country" column="rate_id" referenceTable="mageworx_shippingrules_rates" referenceColumn="rate_id" onDelete="CASCADE"/>
        <!--    <constraint xsi:type="foreign" referenceId="5A291E1902774958099959F18A63A064" disabled="true"/>-->
        <constraint xsi:type="primary" referenceId="MAGEWORX_SHIPPINGRULES_RATES_COUNTRY_RATE_ID_COUNTRY_CODE">
            <column name="rate_id"/>
            <column name="country_code"/>
        </constraint>
    </table>
    <table name="mageworx_shippingrules_rates_region" resource="default" engine="innodb" comment="MageWorx Shipping Rules Rates &amp; Region Relations">
        <column xsi:type="int" name="rate_id" padding="10" unsigned="true" nullable="false" identity="false" comment="Rate Id"/>
        <column xsi:type="varchar" name="region" nullable="false" length="64" comment="Region"/>
        <constraint xsi:type="foreign" referenceId="FK_F60B217C2E46CF0CAEF15878A0FD5FB0" table="mageworx_shippingrules_rates_region" column="rate_id" referenceTable="mageworx_shippingrules_rates" referenceColumn="rate_id" onDelete="CASCADE"/>
        <!--    <constraint xsi:type="foreign" referenceId="F60B217C2E46CF0CAEF15878A0FD5FB0" disabled="true"/>-->
        <constraint xsi:type="primary" referenceId="MAGEWORX_SHIPPINGRULES_RATES_REGION_RATE_ID_REGION">
            <column name="rate_id"/>
            <column name="region"/>
        </constraint>
    </table>
    <table name="mageworx_shippingrules_rates_region_id" resource="default" engine="innodb" comment="MageWorx Shipping Rules Rates &amp; Region Ids Relations">
        <column xsi:type="int" name="rate_id" padding="10" unsigned="true" nullable="false" identity="false" comment="Rate Id"/>
        <column xsi:type="int" name="region_id" padding="10" unsigned="true" nullable="false" identity="false" comment="Region Id"/>
        <constraint xsi:type="foreign" referenceId="FK_9BE408B5A883474E44936EB06A246F8E" table="mageworx_shippingrules_rates_region_id" column="rate_id" referenceTable="mageworx_shippingrules_rates" referenceColumn="rate_id" onDelete="CASCADE"/>
        <!--    <constraint xsi:type="foreign" referenceId="9BE408B5A883474E44936EB06A246F8E" disabled="true"/>-->
        <constraint xsi:type="primary" referenceId="MAGEWORX_SHIPPINGRULES_RATES_REGION_ID_RATE_ID_REGION_ID">
            <column name="rate_id"/>
            <column name="region_id"/>
        </constraint>
    </table>
    <table name="mageworx_shippingrules_rates_zips_diapason_numeric" resource="default" engine="innodb" comment="MageWorx Shipping Rules Zips From-To/Rate Relations Table for (Numeric format)">
        <column xsi:type="int" name="rate_id" padding="10" unsigned="true" nullable="false" identity="false" comment="Rate Id"/>
        <column xsi:type="int" name="from" padding="11" unsigned="false" nullable="false" identity="false" comment="Zip From"/>
        <column xsi:type="int" name="to" padding="11" unsigned="false" nullable="false" identity="false" comment="Zip To"/>
        <column xsi:type="boolean" name="inverted" nullable="false" comment="Is diapason inverted (Not In)"/>
        <constraint xsi:type="foreign" referenceId="FK_8B74DC3471C96A8CA70832BB6A261F3F" table="mageworx_shippingrules_rates_zips_diapason_numeric" column="rate_id" referenceTable="mageworx_shippingrules_rates" referenceColumn="rate_id" onDelete="CASCADE"/>
        <!--    <constraint xsi:type="foreign" referenceId="8B74DC3471C96A8CA70832BB6A261F3F" disabled="true"/>-->
        <constraint xsi:type="primary" referenceId="MAGEWORX_SHPPRULES_RATES_ZIPS_DIAPASON_NUMERIC_RATE_ID_FROM_TO">
            <column name="rate_id"/>
            <column name="from"/>
            <column name="to"/>
        </constraint>
        <index referenceId="MAGEWORX_SHIPPINGRULES_RATES_ZIPS_DIAPASON_NUMERIC_INVERTED" indexType="btree">
            <column name="inverted"/>
        </index>
        <index referenceId="MAGEWORX_SHIPPINGRULES_RATES_ZIPS_DIAPASON_NUMERIC_FROM" indexType="btree">
            <column name="from"/>
        </index>
        <index referenceId="MAGEWORX_SHIPPINGRULES_RATES_ZIPS_DIAPASON_NUMERIC_TO" indexType="btree">
            <column name="to"/>
        </index>
    </table>
    <table name="mageworx_shippingrules_rates_zips_diapason_alphanumeric" resource="default" engine="innodb" comment="MageWorx Shipping Rules Zips From-To/Rate Relations Table for (Numeric format)">
        <column xsi:type="int" name="rate_id" padding="10" unsigned="true" nullable="false" identity="false" comment="Rate Id"/>
        <column xsi:type="varchar" name="from" nullable="false" length="12" comment="Zip From"/>
        <column xsi:type="varchar" name="to" nullable="false" length="12" comment="Zip To"/>
        <column xsi:type="boolean" name="inverted" nullable="false" comment="Is diapason inverted (Not In)"/>
        <constraint xsi:type="foreign" referenceId="FK_2583E58E3E1031E961F36DE132BC91C7" table="mageworx_shippingrules_rates_zips_diapason_alphanumeric" column="rate_id" referenceTable="mageworx_shippingrules_rates" referenceColumn="rate_id" onDelete="CASCADE"/>
        <!--    <constraint xsi:type="foreign" referenceId="2583E58E3E1031E961F36DE132BC91C7" disabled="true"/>-->
        <constraint xsi:type="primary" referenceId="IDX_413CFFB30E1F0FE563FA9AA07C5936D0">
            <column name="rate_id"/>
            <column name="from"/>
            <column name="to"/>
        </constraint>
        <index referenceId="MAGEWORX_SHIPPINGRULES_RATES_ZIPS_DIAPASON_ALPHANUMERIC_INVERTED" indexType="btree">
            <column name="inverted"/>
        </index>
        <index referenceId="MAGEWORX_SHIPPINGRULES_RATES_ZIPS_DIAPASON_ALPHANUMERIC_FROM" indexType="btree">
            <column name="from"/>
        </index>
        <index referenceId="MAGEWORX_SHIPPINGRULES_RATES_ZIPS_DIAPASON_ALPHANUMERIC_TO" indexType="btree">
            <column name="to"/>
        </index>
    </table>
    <table name="mageworx_shippingrules_rates_zips_diapason_uk" resource="default" engine="innodb" comment="MageWorx Shipping Rules Zips From-To/Rate Relations Table for (Numeric format)">
        <column xsi:type="int" name="rate_id" padding="10" unsigned="true" nullable="false" identity="false" comment="Rate Id"/>
        <column xsi:type="varchar" name="from" nullable="false" length="8" comment="Zip From As Is"/>
        <column xsi:type="varchar" name="to" nullable="false" length="8" comment="Zip To As Is"/>
        <column xsi:type="varchar" name="from_area" nullable="true" length="2" comment="From UK Zip Area"/>
        <column xsi:type="int" name="from_district_number" padding="11" unsigned="false" nullable="true" identity="false" comment="From UK Zip District (Numeric Part)"/>
        <column xsi:type="varchar" name="from_district_letter" nullable="true" length="1" comment="From UK Zip District (Letter Part)"/>
        <column xsi:type="int" name="from_sector" padding="11" unsigned="false" nullable="true" identity="false" comment="From UK Zip Sector"/>
        <column xsi:type="varchar" name="from_unit" nullable="true" length="2" comment="From UK Zip Unit"/>
        <column xsi:type="varchar" name="to_area" nullable="true" length="2" comment="To UK Zip Area"/>
        <column xsi:type="int" name="to_district_number" padding="11" unsigned="false" nullable="true" identity="false" comment="To UK Zip District (Numeric Part)"/>
        <column xsi:type="varchar" name="to_district_letter" nullable="true" length="1" comment="To UK Zip District (Letter Part)"/>
        <column xsi:type="int" name="to_sector" padding="11" unsigned="false" nullable="true" identity="false" comment="To UK Zip Sector"/>
        <column xsi:type="varchar" name="to_unit" nullable="true" length="2" comment="To UK Zip Unit"/>
        <column xsi:type="boolean" name="inverted" nullable="false" comment="Is diapason inverted (Not In)"/>
        <constraint xsi:type="foreign" referenceId="FK_74CF65D3ED66ED496DFE699F4EFE2672" table="mageworx_shippingrules_rates_zips_diapason_uk" column="rate_id" referenceTable="mageworx_shippingrules_rates" referenceColumn="rate_id" onDelete="CASCADE"/>
        <!--    <constraint xsi:type="foreign" referenceId="74CF65D3ED66ED496DFE699F4EFE2672" disabled="true"/>-->
        <constraint xsi:type="primary" referenceId="MAGEWORX_SHIPPINGRULES_RATES_ZIPS_DIAPASON_UK_RATE_ID_FROM_TO">
            <column name="rate_id"/>
            <column name="from"/>
            <column name="to"/>
        </constraint>
        <index referenceId="MAGEWORX_SHIPPINGRULES_RATES_ZIPS_DIAPASON_UK_INVERTED" indexType="btree">
            <column name="inverted"/>
        </index>
        <index referenceId="MAGEWORX_SHIPPINGRULES_RATES_ZIPS_DIAPASON_UK_FROM_AREA" indexType="btree">
            <column name="from_area"/>
        </index>
        <index referenceId="MAGEWORX_SHPPRULES_RATES_ZIPS_DIAPASON_UK_FROM_DISTRICT_NUMBER" indexType="btree">
            <column name="from_district_number"/>
        </index>
        <index referenceId="MAGEWORX_SHPPRULES_RATES_ZIPS_DIAPASON_UK_FROM_DISTRICT_LETTER" indexType="btree">
            <column name="from_district_letter"/>
        </index>
        <index referenceId="MAGEWORX_SHIPPINGRULES_RATES_ZIPS_DIAPASON_UK_FROM_SECTOR" indexType="btree">
            <column name="from_sector"/>
        </index>
        <index referenceId="MAGEWORX_SHIPPINGRULES_RATES_ZIPS_DIAPASON_UK_FROM_UNIT" indexType="btree">
            <column name="from_unit"/>
        </index>
        <index referenceId="MAGEWORX_SHIPPINGRULES_RATES_ZIPS_DIAPASON_UK_TO_AREA" indexType="btree">
            <column name="to_area"/>
        </index>
        <index referenceId="MAGEWORX_SHIPPINGRULES_RATES_ZIPS_DIAPASON_UK_TO_DISTRICT_NUMBER" indexType="btree">
            <column name="to_district_number"/>
        </index>
        <index referenceId="MAGEWORX_SHIPPINGRULES_RATES_ZIPS_DIAPASON_UK_TO_DISTRICT_LETTER" indexType="btree">
            <column name="to_district_letter"/>
        </index>
        <index referenceId="MAGEWORX_SHIPPINGRULES_RATES_ZIPS_DIAPASON_UK_TO_SECTOR" indexType="btree">
            <column name="to_sector"/>
        </index>
        <index referenceId="MAGEWORX_SHIPPINGRULES_RATES_ZIPS_DIAPASON_UK_TO_UNIT" indexType="btree">
            <column name="to_unit"/>
        </index>
    </table>
    <table name="mageworx_shippingrules_rates_zips_diapason_nl" resource="default" engine="innodb" comment="MageWorx Shipping Rules Zips From-To/Rate Relations Table for (Numeric format)">
        <column xsi:type="int" name="rate_id" padding="10" unsigned="true" nullable="false" identity="false" comment="Rate Id"/>
        <column xsi:type="varchar" name="from" nullable="false" length="8" comment="Zip From Link"/>
        <column xsi:type="varchar" name="to" nullable="false" length="8" comment="Zip To Link"/>
        <column xsi:type="int" name="from_digit_part" padding="11" unsigned="false" nullable="true" identity="false" comment="From Digit Part Of Zip"/>
        <column xsi:type="varchar" name="from_letter_part" nullable="true" length="2" comment="From Letter Part Of Zip"/>
        <column xsi:type="int" name="to_digit_part" padding="11" unsigned="false" nullable="true" identity="false" comment="To Digit Part Of Zip"/>
        <column xsi:type="varchar" name="to_letter_part" nullable="true" length="2" comment="To Letter Part Of Zip"/>
        <column xsi:type="boolean" name="inverted" nullable="false" comment="Is diapason inverted (Not In)"/>
        <constraint xsi:type="foreign" referenceId="FK_9F9DBC58FBD7B7F199E34CC121582DEB" table="mageworx_shippingrules_rates_zips_diapason_nl" column="rate_id" referenceTable="mageworx_shippingrules_rates" referenceColumn="rate_id" onDelete="CASCADE"/>
        <!--    <constraint xsi:type="foreign" referenceId="9F9DBC58FBD7B7F199E34CC121582DEB" disabled="true"/>-->
        <constraint xsi:type="primary" referenceId="MAGEWORX_SHIPPINGRULES_RATES_ZIPS_DIAPASON_NL_RATE_ID_FROM_TO">
            <column name="rate_id"/>
            <column name="from"/>
            <column name="to"/>
        </constraint>
        <index referenceId="MAGEWORX_SHIPPINGRULES_RATES_ZIPS_DIAPASON_NL_INVERTED" indexType="btree">
            <column name="inverted"/>
        </index>
        <index referenceId="MAGEWORX_SHIPPINGRULES_RATES_ZIPS_DIAPASON_NL_FROM_DIGIT_PART" indexType="btree">
            <column name="from_digit_part"/>
        </index>
        <index referenceId="MAGEWORX_SHIPPINGRULES_RATES_ZIPS_DIAPASON_NL_FROM_LETTER_PART" indexType="btree">
            <column name="from_letter_part"/>
        </index>
        <index referenceId="MAGEWORX_SHIPPINGRULES_RATES_ZIPS_DIAPASON_NL_TO_DIGIT_PART" indexType="btree">
            <column name="to_digit_part"/>
        </index>
        <index referenceId="MAGEWORX_SHIPPINGRULES_RATES_ZIPS_DIAPASON_NL_TO_LETTER_PART" indexType="btree">
            <column name="to_letter_part"/>
        </index>
    </table>
    <table name="mageworx_shippingrules_rates_zips" resource="default" engine="innodb" comment="MageWorx Shipping Rules Zips to Rates Relations">
        <column xsi:type="int" name="rate_id" padding="10" unsigned="true" nullable="false" identity="false" comment="Rate Id"/>
        <column xsi:type="varchar" name="zip" nullable="false" length="18" comment="Zip"/>
        <column xsi:type="boolean" name="inverted" nullable="false" comment="Is zip inverted (Not In)"/>
        <constraint xsi:type="foreign" referenceId="FK_CFA3AFD72F9D487760886F2D3BD67ED7" table="mageworx_shippingrules_rates_zips" column="rate_id" referenceTable="mageworx_shippingrules_rates" referenceColumn="rate_id" onDelete="CASCADE"/>
        <!--    <constraint xsi:type="foreign" referenceId="CFA3AFD72F9D487760886F2D3BD67ED7" disabled="true"/>-->
        <constraint xsi:type="primary" referenceId="MAGEWORX_SHIPPINGRULES_RATES_ZIPS_RATE_ID_ZIP">
            <column name="rate_id"/>
            <column name="zip"/>
        </constraint>
        <index referenceId="MAGEWORX_SHIPPINGRULES_RATES_ZIPS_ZIP" indexType="btree">
            <column name="zip"/>
        </index>
        <index referenceId="MAGEWORX_SHIPPINGRULES_RATES_ZIPS_INVERTED" indexType="btree">
            <column name="inverted"/>
        </index>
    </table>
</schema>
