Skip to content

Change InstallSchema by db_schema #27

@edcris05

Description

@edcris05

Hello, First, thank you for this module, its very well done; I changed installSchemma by db_schema because, so i want to share here, i am still a noob with this, thous if you want to make a change or suggestions. Please make it.
<?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="sp_orderattachment" resource="default" engine="innodb" comment="Order Attachment"> <column xsi:type="int" name="attachment_id" unsigned="true" nullable="false" identity="true" comment="Attachment ID"/> <column xsi:type="int" name="quote_id" unsigned="true" nullable="true" comment="Quote ID"/> <column xsi:type="int" name="order_id" unsigned="true" nullable="true" default="null" comment="Order ID"/> <column xsi:type="varchar" name="path" nullable="false" comment="Path"/> <column xsi:type="varchar" name="comment" default="" nullable="false" comment="Comment"/> <column xsi:type="varchar" name="hash" length="32" nullable="false" comment="Hash"/> <column xsi:type="varchar" name="type" length="32" nullable="false" comment="File Type"/> <column xsi:type="timestamp" name="uploaded_at" nullable="false" comment="Uploaded at"/> <column xsi:type="timestamp" name="modified_at" nullable="false" comment="Modified at"/> <constraint xsi:type="primary" referenceId="PRIMARY"> <column name="attachment_id"/> </constraint> <constraint xsi:type="foreign" referenceId="SALES_ORDER_ORDER_ID" table="sp_orderattachment" column="order_id" referenceTable="sales_order" referenceColumn="entity_id" onDelete="CASCADE" /> <index referenceId="INDEX_QUOTE_ID" indexType="btree"> <column name="quote_id"/> </index> <index referenceId="INDEX_ORDER_ID" indexType="btree"> <column name="order_id"/> </index> <index referenceId="INDEX_HASH" indexType="btree"> <column name="hash"/> </index> </table> </schema>
hope this is helpful for someone else. See you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions