Skip to content

Commit c479405

Browse files
J7FJ7F
authored andcommitted
PES-2788: uninstall may not delete tables
1 parent 94d0cf6 commit c479405

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

packetery/libs/Module/Uninstaller.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,10 @@ public function deleteTab($className)
8787
*/
8888
private function uninstallDatabase()
8989
{
90+
if (defined('PACKETERY_KEEP_DB_TABLES') && PACKETERY_KEEP_DB_TABLES) {
91+
return true;
92+
}
93+
9094
$sql = [];
9195
// remove tables with payment and carrier settings, and with carriers
9296
$sql[] = 'DROP TABLE IF EXISTS `' . _DB_PREFIX_ . 'packetery_payment`';
@@ -140,6 +144,10 @@ private function unregisterHooks()
140144
*/
141145
private function deleteConfiguration()
142146
{
147+
if (defined('PACKETERY_KEEP_DB_TABLES') && PACKETERY_KEEP_DB_TABLES) {
148+
return true;
149+
}
150+
143151
return (
144152
Configuration::deleteByName('PACKETERY_APIPASS') &&
145153
Configuration::deleteByName('PACKETERY_ESHOP_ID') &&

0 commit comments

Comments
 (0)