Skip to content

Commit b555eb1

Browse files
committed
tables for new backup schedules
1 parent 7aca993 commit b555eb1

File tree

2 files changed

+63
-3
lines changed

2 files changed

+63
-3
lines changed

baseTemplate/templates/baseTemplate/index.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -585,12 +585,12 @@
585585
<li class="addDeleteDestinations"><a href="{% url 'backupDestinations' %}"
586586
title="{% trans 'Add Destination' %}"><span>{% trans "Add/Delete Destination" %}</span></a>
587587
</li>
588-
<li class="createBackup"><a href="{% url 'gDrive' %}"
589-
title="{% trans 'Setup Google Drive' %}"><span>{% trans "Setup Google Drive" %}</span></a>
590-
</li>
591588
<li class="scheDuleBackups"><a href="{% url 'scheduleBackup' %}"
592589
title="{% trans 'Schedule Back up' %}"><span>{% trans "Schedule Back up" %}</span></a>
593590
</li>
591+
<li class="createBackup"><a href="{% url 'gDrive' %}"
592+
title="{% trans 'Setup Google Drive' %}"><span>{% trans "Setup Google Drive" %}</span></a>
593+
</li>
594594
<li class="remoteBackups"><a href="{% url 'remoteBackups' %}"
595595
title="{% trans 'Remote Back ups' %}"><span>{% trans "Remote Back ups" %}</span></a>
596596
</li>

plogical/upgrade.py

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -653,6 +653,66 @@ def applyLoginSystemMigrations():
653653
except:
654654
pass
655655

656+
query = """CREATE TABLE `websiteFunctions_normalbackupdests` (
657+
`id` int(11) NOT NULL AUTO_INCREMENT,
658+
`name` varchar(25) NOT NULL,
659+
`config` longtext NOT NULL,
660+
PRIMARY KEY (`id`)
661+
)"""
662+
663+
try:
664+
cursor.execute(query)
665+
except:
666+
pass
667+
668+
query = """CREATE TABLE `websiteFunctions_normalbackupjobs` (
669+
`id` int(11) NOT NULL AUTO_INCREMENT,
670+
`name` varchar(25) NOT NULL,
671+
`config` longtext NOT NULL,
672+
`owner_id` int(11) NOT NULL,
673+
PRIMARY KEY (`id`),
674+
KEY `websiteFunctions_nor_owner_id_3a7a13db_fk_websiteFu` (`owner_id`),
675+
CONSTRAINT `websiteFunctions_nor_owner_id_3a7a13db_fk_websiteFu` FOREIGN KEY (`owner_id`) REFERENCES `websiteFunctions_normalbackupdests` (`id`)
676+
)"""
677+
678+
try:
679+
cursor.execute(query)
680+
except:
681+
pass
682+
683+
684+
query = """CREATE TABLE `websiteFunctions_normalbackupsites` (
685+
`id` int(11) NOT NULL AUTO_INCREMENT,
686+
`domain_id` int(11) NOT NULL,
687+
`owner_id` int(11) NOT NULL,
688+
PRIMARY KEY (`id`),
689+
KEY `websiteFunctions_nor_domain_id_c03362bc_fk_websiteFu` (`domain_id`),
690+
KEY `websiteFunctions_nor_owner_id_c6ece6cc_fk_websiteFu` (`owner_id`),
691+
CONSTRAINT `websiteFunctions_nor_domain_id_c03362bc_fk_websiteFu` FOREIGN KEY (`domain_id`) REFERENCES `websiteFunctions_websites` (`id`),
692+
CONSTRAINT `websiteFunctions_nor_owner_id_c6ece6cc_fk_websiteFu` FOREIGN KEY (`owner_id`) REFERENCES `websiteFunctions_normalbackupjobs` (`id`)
693+
)"""
694+
695+
try:
696+
cursor.execute(query)
697+
except:
698+
pass
699+
700+
701+
query = """CREATE TABLE `websiteFunctions_normalbackupjoblogs` (
702+
`id` int(11) NOT NULL AUTO_INCREMENT,
703+
`status` int(11) NOT NULL,
704+
`message` longtext NOT NULL,
705+
`owner_id` int(11) NOT NULL,
706+
PRIMARY KEY (`id`),
707+
KEY `websiteFunctions_nor_owner_id_69403e73_fk_websiteFu` (`owner_id`),
708+
CONSTRAINT `websiteFunctions_nor_owner_id_69403e73_fk_websiteFu` FOREIGN KEY (`owner_id`) REFERENCES `websiteFunctions_normalbackupjobs` (`id`)
709+
)"""
710+
711+
try:
712+
cursor.execute(query)
713+
except:
714+
pass
715+
656716
try:
657717
connection.close()
658718
except:

0 commit comments

Comments
 (0)