diff --git a/Setup/InstallSchema.php b/Setup/InstallSchema.php deleted file mode 100644 index 08cd53d..0000000 --- a/Setup/InstallSchema.php +++ /dev/null @@ -1,82 +0,0 @@ -startSetup(); - $table_experius_emailcatcher = $setup->getConnection()->newTable($setup->getTable('experius_emailcatcher')); - $table_experius_emailcatcher->addColumn( - 'emailcatcher_id', - \Magento\Framework\DB\Ddl\Table::TYPE_INTEGER, - null, - ['identity' => true, 'nullable' => false, 'primary' => true, 'unsigned' => true,], - 'Entity ID' - ); - $table_experius_emailcatcher->addColumn( - 'to', - \Magento\Framework\DB\Ddl\Table::TYPE_TEXT, - null, - [], - 'To Email Address' - ); - $table_experius_emailcatcher->addColumn( - 'from', - \Magento\Framework\DB\Ddl\Table::TYPE_TEXT, - null, - [], - 'From Email Address' - ); - $table_experius_emailcatcher->addColumn( - 'subject', - \Magento\Framework\DB\Ddl\Table::TYPE_TEXT, - null, - [], - 'Subject' - ); - $table_experius_emailcatcher->addColumn( - 'body', - \Magento\Framework\DB\Ddl\Table::TYPE_TEXT, - null, - [], - 'Email Body' - ); - $table_experius_emailcatcher->addColumn( - 'created_at', - \Magento\Framework\DB\Ddl\Table::TYPE_DATETIME, - null, - [], - 'Created At' - ); - $table_experius_emailcatcher->addColumn( - 'store_id', - \Magento\Framework\DB\Ddl\Table::TYPE_INTEGER, - null, - [], - 'Store Id' - ); - $setup->getConnection()->createTable($table_experius_emailcatcher); - $setup->endSetup(); - } -} diff --git a/Setup/UpgradeSchema.php b/Setup/UpgradeSchema.php deleted file mode 100644 index 75eb677..0000000 --- a/Setup/UpgradeSchema.php +++ /dev/null @@ -1,58 +0,0 @@ -getVersion(), "1.0.1", "<")) { - $connection = $setup->getConnection(); - if (!$connection->tableColumnExists($setup->getTable('experius_emailcatcher'), 'recipient')) { - $connection->changeColumn( - $setup->getTable('experius_emailcatcher'), - 'to', - 'recipient', - ['type' => \Magento\Framework\DB\Ddl\Table::TYPE_TEXT] - ); - } - if (!$connection->tableColumnExists($setup->getTable('experius_emailcatcher'), 'sender')) { - $connection->changeColumn( - $setup->getTable('experius_emailcatcher'), - 'from', - 'sender', - ['type' => \Magento\Framework\DB\Ddl\Table::TYPE_TEXT] - ); - } - } - if (version_compare($context->getVersion(), "1.0.2", "<")) { - $connection = $setup->getConnection(); - if (!$connection->tableColumnExists($setup->getTable('experius_emailcatcher'), 'template_identifier')) { - $connection->addColumn( - $setup->getTable('experius_emailcatcher'), - 'template_identifier', - [ - 'type' => \Magento\Framework\DB\Ddl\Table::TYPE_TEXT, - 'nullable' => true, - 'comment' => 'Email Template Identifier' - ] - ); - } - } - } -} diff --git a/etc/db_schema.xml b/etc/db_schema.xml index 420a84b..dba46b4 100644 --- a/etc/db_schema.xml +++ b/etc/db_schema.xml @@ -1,16 +1,22 @@ - - - - - - - - - - - - - -
+ + + + + + + + + + + + + + + + +
diff --git a/etc/db_schema_whitelist.json b/etc/db_schema_whitelist.json new file mode 100644 index 0000000..47a11b6 --- /dev/null +++ b/etc/db_schema_whitelist.json @@ -0,0 +1,19 @@ +{ + "experius_emailcatcher": { + "column": { + "emailcatcher_id": true, + "recipient": true, + "sender": true, + "subject": true, + "body": true, + "template_identifier": true, + "created_at": true, + "store_id": true, + "to": true, + "from": true + }, + "constraint": { + "PRIMARY": true + } + } +} \ No newline at end of file