From 4aad566347dc01bc23262a9a94e8b4c2eb428997 Mon Sep 17 00:00:00 2001 From: Sudheer Kumar Nayak <46211976+sudheernayak31@users.noreply.github.com> Date: Sun, 5 Jul 2020 00:46:58 +0530 Subject: [PATCH] Update UpgradeSchema.php Resolve DB prefix with upgrade schema --- Setup/UpgradeSchema.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Setup/UpgradeSchema.php b/Setup/UpgradeSchema.php index b2c9d26..f60a8f3 100644 --- a/Setup/UpgradeSchema.php +++ b/Setup/UpgradeSchema.php @@ -23,17 +23,17 @@ public function upgrade( ) { if (version_compare($context->getVersion(), "1.0.1", "<")) { $connection = $setup->getConnection(); - if (!$connection->tableColumnExists('experius_emailcatcher', 'recipient')) { + if (!$connection->tableColumnExists($setup->getTable('experius_emailcatcher'), 'recipient')) { $connection->changeColumn( - 'experius_emailcatcher', + $setup->getTable('experius_emailcatcher'), 'to', 'recipient', ['type' => \Magento\Framework\DB\Ddl\Table::TYPE_TEXT] ); } - if (!$connection->tableColumnExists('experius_emailcatcher', 'sender')) { + if (!$connection->tableColumnExists($setup->getTable('experius_emailcatcher'), 'sender')) { $connection->changeColumn( - 'experius_emailcatcher', + $setup->getTable('experius_emailcatcher'), 'from', 'sender', ['type' => \Magento\Framework\DB\Ddl\Table::TYPE_TEXT] @@ -41,4 +41,4 @@ public function upgrade( } } } -} \ No newline at end of file +}