Skip to content
Permalink
Browse files
table for scheduled backup logs
  • Loading branch information
usmannasir committed May 20, 2020
1 parent f3322cd commit dd8cd6fc2f97f4331316b3066841701753da1f9a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
@@ -17,12 +17,12 @@
from re import match,I,M
import signal
from datetime import datetime
from websiteFunctions.models import BackupJob, BackupJobLogs

class backupScheduleLocal:
localBackupPath = '/home/cyberpanel/localBackupPath'
now = datetime.now()


@staticmethod
def prepare():
try:
@@ -1243,6 +1243,8 @@ def IncBackupMigrations():
`logFile` varchar(1000) NOT NULL,
`ipAddress` varchar(50) NOT NULL,
`port` varchar(15) NOT NULL,
`jobFailedSites` int(11) NOT NULL,
`jobSuccessSites` int(11) NOT NULL,
PRIMARY KEY (`id`)
)"""
try:
@@ -1255,6 +1257,7 @@ def IncBackupMigrations():
`id` int(11) NOT NULL AUTO_INCREMENT,
`message` longtext NOT NULL,
`owner_id` int(11) NOT NULL,
`status` int(11) NOT NULL,
PRIMARY KEY (`id`),
KEY `websiteFunctions_bac_owner_id_af3d15f9_fk_websiteFu` (`owner_id`),
CONSTRAINT `websiteFunctions_bac_owner_id_af3d15f9_fk_websiteFu` FOREIGN KEY (`owner_id`) REFERENCES `websiteFunctions_backupjob` (`id`)
@@ -53,7 +53,10 @@ class BackupJob(models.Model):
logFile = models.CharField(max_length=1000)
ipAddress = models.CharField(max_length=50)
port = models.CharField(max_length=15)
jobSuccessSites = models.IntegerField()
jobFailedSites = models.IntegerField()

class BackupJobLogs(models.Model):
owner = models.ForeignKey(BackupJob, on_delete=models.CASCADE)
status = models.IntegerField()
message = models.TextField()

0 comments on commit dd8cd6f

Please sign in to comment.