diff --git a/Setup/InstallSchema.php b/Setup/InstallSchema.php index 019988e..bfc98cd 100644 --- a/Setup/InstallSchema.php +++ b/Setup/InstallSchema.php @@ -8,27 +8,21 @@ * http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) * Please see LICENSE.txt for the full text of the OSL 3.0 license */ - namespace Experius\EmailCatcher\Setup; - use Magento\Framework\Setup\ModuleContextInterface; use Magento\Framework\Setup\SchemaSetupInterface; use Magento\Framework\Setup\InstallSchemaInterface; - + class InstallSchema implements InstallSchemaInterface { - - public function install( SchemaSetupInterface $setup, ModuleContextInterface $context ) { $installer = $setup; $installer->startSetup(); - $table_experius_emailcatcher = $setup->getConnection()->newTable($setup->getTable('experius_emailcatcher')); - $table_experius_emailcatcher->addColumn( 'emailcatcher_id', \Magento\Framework\DB\Ddl\Table::TYPE_INTEGER, @@ -36,23 +30,20 @@ public function install( ['identity' => true,'nullable' => false,'primary' => true,'unsigned' => true,], 'Entity ID' ); - $table_experius_emailcatcher->addColumn( - 'recipient', + 'to', \Magento\Framework\DB\Ddl\Table::TYPE_TEXT, null, [], 'To Email Address' ); - $table_experius_emailcatcher->addColumn( - 'sender', + 'from', \Magento\Framework\DB\Ddl\Table::TYPE_TEXT, null, [], 'From Email Address' ); - $table_experius_emailcatcher->addColumn( 'subject', \Magento\Framework\DB\Ddl\Table::TYPE_TEXT, @@ -60,7 +51,6 @@ public function install( [], 'Subject' ); - $table_experius_emailcatcher->addColumn( 'body', \Magento\Framework\DB\Ddl\Table::TYPE_TEXT, @@ -68,7 +58,6 @@ public function install( [], 'Email Body' ); - $table_experius_emailcatcher->addColumn( 'created_at', \Magento\Framework\DB\Ddl\Table::TYPE_DATETIME, @@ -76,7 +65,6 @@ public function install( [], 'Created At' ); - $table_experius_emailcatcher->addColumn( 'store_id', \Magento\Framework\DB\Ddl\Table::TYPE_INTEGER, @@ -84,9 +72,7 @@ public function install( [], 'Store Id' ); - $setup->getConnection()->createTable($table_experius_emailcatcher); - $setup->endSetup(); } -} +} \ No newline at end of file