From 096e9323a18b1431b7ceb0a59e1259dd64ee9603 Mon Sep 17 00:00:00 2001 From: Usman Nasir Date: Thu, 14 Jul 2022 22:28:00 +0500 Subject: [PATCH] bug fix: https://github.com/usmannasir/cyberpanel/issues/921 --- plogical/upgrade.py | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/plogical/upgrade.py b/plogical/upgrade.py index 87cad49a2..adb07d059 100755 --- a/plogical/upgrade.py +++ b/plogical/upgrade.py @@ -935,8 +935,10 @@ autocreate_system_folders = On `owner_id` int(11) NOT NULL, PRIMARY KEY (`id`) )""" - - cursor.execute(query) + try: + cursor.execute(query) + except: + pass query = """CREATE TABLE `websiteFunctions_remotebackupschedule` ( `id` int(11) NOT NULL AUTO_INCREMENT, @@ -950,8 +952,10 @@ autocreate_system_folders = On KEY `websiteFunctions_rem_RemoteBackupConfig_i_224c46fb_fk_websiteFu` (`RemoteBackupConfig_id`), CONSTRAINT `websiteFunctions_rem_RemoteBackupConfig_i_224c46fb_fk_websiteFu` FOREIGN KEY (`RemoteBackupConfig_id`) REFERENCES `websiteFunctions_remotebackupconfig` (`id`) )""" - - cursor.execute(query) + try: + cursor.execute(query) + except: + pass query = """CREATE TABLE `websiteFunctions_remotebackupsites` ( `id` int(11) NOT NULL AUTO_INCREMENT, @@ -962,7 +966,10 @@ autocreate_system_folders = On KEY `websiteFunctions_rem_owner_id_d6c4475a_fk_websiteFu` (`owner_id`), CONSTRAINT `websiteFunctions_rem_owner_id_d6c4475a_fk_websiteFu` FOREIGN KEY (`owner_id`) REFERENCES `websiteFunctions_remotebackupschedule` (`id`) )""" - cursor.execute(query) + try: + cursor.execute(query) + except: + pass try: connection.close()