mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2025-01-18 17:15:13 +01:00
Remove backup enabled column
This commit is contained in:
parent
6ca396854d
commit
64116a6cf3
@ -114,7 +114,6 @@ class Backups(BaseModel):
|
|||||||
shutdown = BooleanField(default=False)
|
shutdown = BooleanField(default=False)
|
||||||
before = CharField(default="")
|
before = CharField(default="")
|
||||||
after = CharField(default="")
|
after = CharField(default="")
|
||||||
enabled = BooleanField(default=True)
|
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
table_name = "backups"
|
table_name = "backups"
|
||||||
|
@ -68,8 +68,6 @@
|
|||||||
width="100%" style="table-layout:fixed;">
|
width="100%" style="table-layout:fixed;">
|
||||||
<thead>
|
<thead>
|
||||||
<tr class="rounded">
|
<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',
|
<th scope="col" style="width: 15%; min-width: 10px;">{{ translate('serverBackups', 'name',
|
||||||
data['lang']) }} </th>
|
data['lang']) }} </th>
|
||||||
<th scope="col" style="width: 60%; min-width: 50px;">{{ translate('serverBackups',
|
<th scope="col" style="width: 60%; min-width: 50px;">{{ translate('serverBackups',
|
||||||
@ -83,15 +81,6 @@
|
|||||||
<tbody>
|
<tbody>
|
||||||
{% for backup in data['backups'] %}
|
{% for backup in data['backups'] %}
|
||||||
<tr>
|
<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">
|
<td id="{{backup.backup_name}}" class="id">
|
||||||
<p>{{backup.backup_name}}</p>
|
<p>{{backup.backup_name}}</p>
|
||||||
</td>
|
</td>
|
||||||
@ -126,8 +115,6 @@
|
|||||||
width="100%" style="table-layout:fixed;">
|
width="100%" style="table-layout:fixed;">
|
||||||
<thead>
|
<thead>
|
||||||
<tr class="rounded">
|
<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 style="width: 40%; min-width: 10px;">Name
|
||||||
</th>
|
</th>
|
||||||
<th style="width: 40%; min-width: 50px;">{{ translate('serverBackups', 'edit', data['lang'])
|
<th style="width: 40%; min-width: 50px;">{{ translate('serverBackups', 'edit', data['lang'])
|
||||||
@ -137,15 +124,6 @@
|
|||||||
<tbody>
|
<tbody>
|
||||||
{% for backup in data['backups'] %}
|
{% for backup in data['backups'] %}
|
||||||
<tr>
|
<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">
|
<td id="{{backup.backup_name}}" class="id">
|
||||||
<p>{{backup.backup_name}}</p>
|
<p>{{backup.backup_name}}</p>
|
||||||
</td>
|
</td>
|
||||||
|
@ -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_id=peewee.UUIDField(default=uuid.uuid4))
|
||||||
migrator.add_columns("backups", backup_name=peewee.CharField(default="Default"))
|
migrator.add_columns("backups", backup_name=peewee.CharField(default="Default"))
|
||||||
migrator.add_columns("backups", backup_location=peewee.CharField(default=""))
|
migrator.add_columns("backups", backup_location=peewee.CharField(default=""))
|
||||||
migrator.add_columns("backups", enabled=peewee.BooleanField(default=True))
|
|
||||||
|
|
||||||
class Servers(peewee.Model):
|
class Servers(peewee.Model):
|
||||||
server_id = peewee.CharField(primary_key=True, default=str(uuid.uuid4()))
|
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)
|
shutdown = peewee.BooleanField(default=False)
|
||||||
before = peewee.CharField(default="")
|
before = peewee.CharField(default="")
|
||||||
after = peewee.CharField(default="")
|
after = peewee.CharField(default="")
|
||||||
enabled = peewee.BooleanField(default=True)
|
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
table_name = "new_backups"
|
table_name = "new_backups"
|
||||||
@ -85,7 +83,6 @@ def migrate(migrator: Migrator, database, **kwargs):
|
|||||||
shutdown=backup.shutdown,
|
shutdown=backup.shutdown,
|
||||||
before=backup.before,
|
before=backup.before,
|
||||||
after=backup.after,
|
after=backup.after,
|
||||||
enabled=True,
|
|
||||||
)
|
)
|
||||||
|
|
||||||
# Drop the existing backups table
|
# Drop the existing backups table
|
||||||
|
Loading…
x
Reference in New Issue
Block a user