Remove backup enabled column

This commit is contained in:
Andrew 2024-05-15 21:37:56 -04:00
parent 6ca396854d
commit 64116a6cf3
3 changed files with 0 additions and 26 deletions

View File

@ -114,7 +114,6 @@ class Backups(BaseModel):
shutdown = BooleanField(default=False)
before = CharField(default="")
after = CharField(default="")
enabled = BooleanField(default=True)
class Meta:
table_name = "backups"

View File

@ -68,8 +68,6 @@
width="100%" style="table-layout:fixed;">
<thead>
<tr class="rounded">
<th scope="col" style="width: 5%; min-width: 64px;">{{ translate('serverBackups', 'enabled',
data['lang']) }}</th>
<th scope="col" style="width: 15%; min-width: 10px;">{{ translate('serverBackups', 'name',
data['lang']) }} </th>
<th scope="col" style="width: 60%; min-width: 50px;">{{ translate('serverBackups',
@ -83,15 +81,6 @@
<tbody>
{% for backup in data['backups'] %}
<tr>
<td id="{{backup.enabled}}" class="enabled">
<button type="button" class="btn btn-sm btn-info btn-toggle backup-custom-toggle"
id="backup_{{backup.backup_id}}" name="backup_{{backup.backup_id}}"
data-backup-id="{{backup.backup_id}}"
data-backup-enabled="{{ 'true' if backup.enabled else 'false' }}" data-toggle="button"
aria-pressed="true" autocomplete="off">
<div class="handle"></div>
</button>
</td>
<td id="{{backup.backup_name}}" class="id">
<p>{{backup.backup_name}}</p>
</td>
@ -126,8 +115,6 @@
width="100%" style="table-layout:fixed;">
<thead>
<tr class="rounded">
<th style="width: 20%; min-width: 64px;">{{ translate('serverBackups', 'enabled',
data['lang']) }}</th>
<th style="width: 40%; min-width: 10px;">Name
</th>
<th style="width: 40%; min-width: 50px;">{{ translate('serverBackups', 'edit', data['lang'])
@ -137,15 +124,6 @@
<tbody>
{% for backup in data['backups'] %}
<tr>
<td id="{{backup.enabled}}" class="enabled">
<button type="button" class="btn btn-sm btn-info btn-toggle backup-custom-toggle"
id="backup_{{backup.backup_id}}" name="backup_{{backup.backup_id}}"
data-backup-id="{{backup.backup_id}}"
data-backup-enabled="{{ 'true' if backup.enabled else 'false' }}" data-toggle="button"
aria-pressed="true" autocomplete="off">
<div class="handle"></div>
</button>
</td>
<td id="{{backup.backup_name}}" class="id">
<p>{{backup.backup_name}}</p>
</td>

View File

@ -19,7 +19,6 @@ def migrate(migrator: Migrator, database, **kwargs):
migrator.add_columns("backups", backup_id=peewee.UUIDField(default=uuid.uuid4))
migrator.add_columns("backups", backup_name=peewee.CharField(default="Default"))
migrator.add_columns("backups", backup_location=peewee.CharField(default=""))
migrator.add_columns("backups", enabled=peewee.BooleanField(default=True))
class Servers(peewee.Model):
server_id = peewee.CharField(primary_key=True, default=str(uuid.uuid4()))
@ -59,7 +58,6 @@ def migrate(migrator: Migrator, database, **kwargs):
shutdown = peewee.BooleanField(default=False)
before = peewee.CharField(default="")
after = peewee.CharField(default="")
enabled = peewee.BooleanField(default=True)
class Meta:
table_name = "new_backups"
@ -85,7 +83,6 @@ def migrate(migrator: Migrator, database, **kwargs):
shutdown=backup.shutdown,
before=backup.before,
after=backup.after,
enabled=True,
)
# Drop the existing backups table