mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-14 17:26:17 +01:00
tables for new backup schedules
This commit is contained in:
@@ -585,12 +585,12 @@
|
|||||||
<li class="addDeleteDestinations"><a href="{% url 'backupDestinations' %}"
|
<li class="addDeleteDestinations"><a href="{% url 'backupDestinations' %}"
|
||||||
title="{% trans 'Add Destination' %}"><span>{% trans "Add/Delete Destination" %}</span></a>
|
title="{% trans 'Add Destination' %}"><span>{% trans "Add/Delete Destination" %}</span></a>
|
||||||
</li>
|
</li>
|
||||||
<li class="createBackup"><a href="{% url 'gDrive' %}"
|
|
||||||
title="{% trans 'Setup Google Drive' %}"><span>{% trans "Setup Google Drive" %}</span></a>
|
|
||||||
</li>
|
|
||||||
<li class="scheDuleBackups"><a href="{% url 'scheduleBackup' %}"
|
<li class="scheDuleBackups"><a href="{% url 'scheduleBackup' %}"
|
||||||
title="{% trans 'Schedule Back up' %}"><span>{% trans "Schedule Back up" %}</span></a>
|
title="{% trans 'Schedule Back up' %}"><span>{% trans "Schedule Back up" %}</span></a>
|
||||||
</li>
|
</li>
|
||||||
|
<li class="createBackup"><a href="{% url 'gDrive' %}"
|
||||||
|
title="{% trans 'Setup Google Drive' %}"><span>{% trans "Setup Google Drive" %}</span></a>
|
||||||
|
</li>
|
||||||
<li class="remoteBackups"><a href="{% url 'remoteBackups' %}"
|
<li class="remoteBackups"><a href="{% url 'remoteBackups' %}"
|
||||||
title="{% trans 'Remote Back ups' %}"><span>{% trans "Remote Back ups" %}</span></a>
|
title="{% trans 'Remote Back ups' %}"><span>{% trans "Remote Back ups" %}</span></a>
|
||||||
</li>
|
</li>
|
||||||
|
|||||||
@@ -653,6 +653,66 @@ imap_folder_list_limit = 0
|
|||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
query = """CREATE TABLE `websiteFunctions_normalbackupdests` (
|
||||||
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||||
|
`name` varchar(25) NOT NULL,
|
||||||
|
`config` longtext NOT NULL,
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
)"""
|
||||||
|
|
||||||
|
try:
|
||||||
|
cursor.execute(query)
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
|
||||||
|
query = """CREATE TABLE `websiteFunctions_normalbackupjobs` (
|
||||||
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||||
|
`name` varchar(25) NOT NULL,
|
||||||
|
`config` longtext NOT NULL,
|
||||||
|
`owner_id` int(11) NOT NULL,
|
||||||
|
PRIMARY KEY (`id`),
|
||||||
|
KEY `websiteFunctions_nor_owner_id_3a7a13db_fk_websiteFu` (`owner_id`),
|
||||||
|
CONSTRAINT `websiteFunctions_nor_owner_id_3a7a13db_fk_websiteFu` FOREIGN KEY (`owner_id`) REFERENCES `websiteFunctions_normalbackupdests` (`id`)
|
||||||
|
)"""
|
||||||
|
|
||||||
|
try:
|
||||||
|
cursor.execute(query)
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
query = """CREATE TABLE `websiteFunctions_normalbackupsites` (
|
||||||
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||||
|
`domain_id` int(11) NOT NULL,
|
||||||
|
`owner_id` int(11) NOT NULL,
|
||||||
|
PRIMARY KEY (`id`),
|
||||||
|
KEY `websiteFunctions_nor_domain_id_c03362bc_fk_websiteFu` (`domain_id`),
|
||||||
|
KEY `websiteFunctions_nor_owner_id_c6ece6cc_fk_websiteFu` (`owner_id`),
|
||||||
|
CONSTRAINT `websiteFunctions_nor_domain_id_c03362bc_fk_websiteFu` FOREIGN KEY (`domain_id`) REFERENCES `websiteFunctions_websites` (`id`),
|
||||||
|
CONSTRAINT `websiteFunctions_nor_owner_id_c6ece6cc_fk_websiteFu` FOREIGN KEY (`owner_id`) REFERENCES `websiteFunctions_normalbackupjobs` (`id`)
|
||||||
|
)"""
|
||||||
|
|
||||||
|
try:
|
||||||
|
cursor.execute(query)
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
query = """CREATE TABLE `websiteFunctions_normalbackupjoblogs` (
|
||||||
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||||
|
`status` int(11) NOT NULL,
|
||||||
|
`message` longtext NOT NULL,
|
||||||
|
`owner_id` int(11) NOT NULL,
|
||||||
|
PRIMARY KEY (`id`),
|
||||||
|
KEY `websiteFunctions_nor_owner_id_69403e73_fk_websiteFu` (`owner_id`),
|
||||||
|
CONSTRAINT `websiteFunctions_nor_owner_id_69403e73_fk_websiteFu` FOREIGN KEY (`owner_id`) REFERENCES `websiteFunctions_normalbackupjobs` (`id`)
|
||||||
|
)"""
|
||||||
|
|
||||||
|
try:
|
||||||
|
cursor.execute(query)
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
|
||||||
try:
|
try:
|
||||||
connection.close()
|
connection.close()
|
||||||
except:
|
except:
|
||||||
|
|||||||
Reference in New Issue
Block a user