mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2024-08-30 18:23:09 +00:00
Move backup path from servers to backup
Add uuid field to backups
This commit is contained in:
parent
8e199dcd67
commit
e59b624025
@ -48,7 +48,6 @@ class ServersController(metaclass=Singleton):
|
||||
name: str,
|
||||
server_uuid: str,
|
||||
server_dir: str,
|
||||
backup_path: str,
|
||||
server_command: str,
|
||||
server_file: str,
|
||||
server_log_file: str,
|
||||
@ -83,7 +82,6 @@ class ServersController(metaclass=Singleton):
|
||||
name,
|
||||
server_uuid,
|
||||
server_dir,
|
||||
backup_path,
|
||||
server_command,
|
||||
server_file,
|
||||
server_log_file,
|
||||
|
@ -1,3 +1,4 @@
|
||||
import uuid
|
||||
import logging
|
||||
import datetime
|
||||
from peewee import (
|
||||
@ -9,6 +10,7 @@ from peewee import (
|
||||
TextField,
|
||||
AutoField,
|
||||
BooleanField,
|
||||
UUIDField,
|
||||
)
|
||||
from playhouse.shortcuts import model_to_dict
|
||||
|
||||
@ -120,6 +122,9 @@ class Schedules(BaseModel):
|
||||
# Backups Class
|
||||
# **********************************************************************************
|
||||
class Backups(BaseModel):
|
||||
backup_id = UUIDField(primary_key=True, default=uuid.uuid4)
|
||||
backup_name = CharField(default="New Backup")
|
||||
backup_location = CharField(default="")
|
||||
excluded_dirs = CharField(null=True)
|
||||
max_backups = IntegerField()
|
||||
server_id = ForeignKeyField(Servers, backref="backups_server")
|
||||
|
Loading…
Reference in New Issue
Block a user