From 4b24a7bb3399b26de2c05a1c3dd5ccd27e231c19 Mon Sep 17 00:00:00 2001 From: Raul E Watson Date: Thu, 1 Nov 2018 09:38:20 +0000 Subject: [PATCH 1/3] Fix for issue #25 Table 'pcapredict_tag_settingsdata' doesn't exist --- Setup/UpgradeData.php | 37 ++++++++++++++++++++++--------------- 1 file changed, 22 insertions(+), 15 deletions(-) diff --git a/Setup/UpgradeData.php b/Setup/UpgradeData.php index adb6476..8241507 100644 --- a/Setup/UpgradeData.php +++ b/Setup/UpgradeData.php @@ -1,33 +1,40 @@ -getVersion(), '2.0.7') < 0) { - + // This means any customer with multiple rows can expire all the session keys and will fix the bug where it was + // looking for a row with a particular id. + if (version_compare($context->getVersion(), '2.0.7', '<')) { $tableName = $setup->getTable('pcapredict_tag_settingsdata'); $select = $setup->getConnection()->select()->from($tableName); $result = $setup->getConnection()->fetchAll($select); - foreach ($result as $row) - { + foreach ($result as $row) { // Set the new module_version column with the current of the app. // Because we do not know what vesion they logged in under set to the last version will have to do. - $setup->updateTableRow($tableName, 'pcapredict_tag_settingsdata_id', $row['pcapredict_tag_settingsdata_id'], 'module_version', $context->getVersion()); + $setup->updateTableRow( + $tableName, + 'pcapredict_tag_settingsdata_id', + $row['pcapredict_tag_settingsdata_id'], + 'module_version', + $context->getVersion() + ); } } } -} \ No newline at end of file +} From 5dacda76fe3ab30a1bcec2fc9cc933c36c3ef24b Mon Sep 17 00:00:00 2001 From: Raul E Watson Date: Thu, 1 Nov 2018 09:39:53 +0000 Subject: [PATCH 2/3] Fix for issue #25 Fix for issue #25 Table 'pcapredict_tag_settingsdata' doesn't exist --- Setup/UpgradeSchema.php | 37 +++++++++++++++++-------------------- 1 file changed, 17 insertions(+), 20 deletions(-) diff --git a/Setup/UpgradeSchema.php b/Setup/UpgradeSchema.php index 619ac90..5fe76f0 100644 --- a/Setup/UpgradeSchema.php +++ b/Setup/UpgradeSchema.php @@ -2,45 +2,42 @@ namespace PCAPredict\Tag\Setup; -use Magento\Framework\Setup\UpgradeSchemaInterface; +use Magento\Framework\DB\Ddl\Table; use Magento\Framework\Setup\ModuleContextInterface; use Magento\Framework\Setup\SchemaSetupInterface; -use Magento\Framework\DB\Ddl\Table; +use Magento\Framework\Setup\UpgradeSchemaInterface; // Upgrade will only trigger if the setup_version in the module.xml is increased. class UpgradeSchema implements UpgradeSchemaInterface { - public function upgrade(SchemaSetupInterface $setup, ModuleContextInterface $context){ - + public function upgrade(SchemaSetupInterface $setup, ModuleContextInterface $context) + { $setup->startSetup(); - - if(!$context->getVersion()) { - // No previous version found. - } - - if (version_compare($context->getVersion(), '2.0.7') < 0) { + if (version_compare($context->getVersion(), '2.0.7', '<')) { // Get module table $tableName = $setup->getTable('pcapredict_tag_settingsdata'); // Check if the table already exists - if ($setup->getConnection()->isTableExists($tableName) == true) { - + if ($setup->getConnection()->isTableExists($tableName) === true) { // Remove any columns we don't need. $setup->getConnection()->dropColumn($tableName, 'update_time'); // Add the version column so we can record what version of the app the creds were created from. // In UpgradeData we set this column to the current version. - $setup->getConnection()->addColumn($tableName, 'module_version', - [ - 'type' => Table::TYPE_TEXT, - 'length' => 16, - 'nullable' => true, - 'comment' => 'Created With App Version' - ]); + $setup->getConnection()->addColumn( + $tableName, + 'module_version', + [ + 'type' => Table::TYPE_TEXT, + 'length' => 16, + 'nullable' => true, + 'comment' => 'Created With App Version', + ] + ); } } $setup->endSetup(); } -} \ No newline at end of file +} From 6c23a82bf9b191caed2034d79bce9f80eb63d4f8 Mon Sep 17 00:00:00 2001 From: Raul E Watson Date: Tue, 4 Feb 2020 14:06:24 +0000 Subject: [PATCH 3/3] Allow installation on PHP 7.3 --- composer.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index d643dcf..0e7b647 100644 --- a/composer.json +++ b/composer.json @@ -8,7 +8,7 @@ } }, "require": { - "php": "~5.5.0|~5.6.0|~7.0.0|~7.1.0" + "php": "~5.5.0|~5.6.0|~7.0.0|~7.1.0|~7.2.0|~7.3.0" }, "autoload": { "psr-4": { @@ -19,7 +19,7 @@ ] }, "type": "magento2-module", - "version": "2.0.7", + "version": "2.0.7.1", "authors": [ { "name": "PCA Predict",