mirror of
https://github.com/eduardogsilva/routerfleet.git
synced 2025-07-12 19:24:22 +02:00
Backup models implementation
This commit is contained in:
parent
a8952676d7
commit
15fdbe00fa
12 changed files with 183 additions and 1 deletions
47
backup/migrations/0001_initial.py
Normal file
47
backup/migrations/0001_initial.py
Normal file
|
@ -0,0 +1,47 @@
|
|||
# Generated by Django 5.0.3 on 2024-03-17 13:41
|
||||
|
||||
import uuid
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
initial = True
|
||||
|
||||
dependencies = [
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='BackupProfile',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('name', models.CharField(max_length=100, unique=True)),
|
||||
('daily_backup', models.BooleanField(default=True)),
|
||||
('weekly_backup', models.BooleanField(default=False)),
|
||||
('monthly_backup', models.BooleanField(default=False)),
|
||||
('daily_retenion', models.IntegerField(default=7)),
|
||||
('weekly_retention', models.IntegerField(default=30)),
|
||||
('monthly_retenion', models.IntegerField(default=365)),
|
||||
('retain_backups_on_error', models.BooleanField(default=True)),
|
||||
('daily_day_monday', models.BooleanField(default=True)),
|
||||
('daily_day_tuesday', models.BooleanField(default=True)),
|
||||
('daily_day_wednesday', models.BooleanField(default=True)),
|
||||
('daily_day_thursday', models.BooleanField(default=True)),
|
||||
('daily_day_friday', models.BooleanField(default=True)),
|
||||
('daily_day_saturday', models.BooleanField(default=True)),
|
||||
('daily_day_sunday', models.BooleanField(default=True)),
|
||||
('weekly_day', models.CharField(choices=[('monday', 'Monday'), ('tuesday', 'Tuesday'), ('wednesday', 'Wednesday'), ('thursday', 'Thursday'), ('friday', 'Friday'), ('saturday', 'Saturday'), ('sunday', 'Sunday')], max_length=10)),
|
||||
('monthly_day', models.IntegerField(choices=[(1, '1st'), (7, '7th'), (14, '14th'), (21, '21st'), (28, '28th')], default=1)),
|
||||
('daily_hour', models.IntegerField(choices=[(0, '00:00'), (1, '01:00'), (2, '02:00'), (3, '03:00'), (4, '04:00'), (5, '05:00'), (6, '06:00'), (7, '07:00'), (8, '08:00'), (9, '09:00'), (10, '10:00'), (11, '11:00'), (12, '12:00'), (13, '13:00'), (14, '14:00'), (15, '15:00'), (16, '16:00'), (17, '17:00'), (18, '18:00'), (19, '19:00'), (20, '20:00'), (21, '21:00'), (22, '22:00'), (23, '23:00')], default=3)),
|
||||
('weekly_hour', models.IntegerField(choices=[(0, '00:00'), (1, '01:00'), (2, '02:00'), (3, '03:00'), (4, '04:00'), (5, '05:00'), (6, '06:00'), (7, '07:00'), (8, '08:00'), (9, '09:00'), (10, '10:00'), (11, '11:00'), (12, '12:00'), (13, '13:00'), (14, '14:00'), (15, '15:00'), (16, '16:00'), (17, '17:00'), (18, '18:00'), (19, '19:00'), (20, '20:00'), (21, '21:00'), (22, '22:00'), (23, '23:00')], default=1)),
|
||||
('monthly_hour', models.IntegerField(choices=[(0, '00:00'), (1, '01:00'), (2, '02:00'), (3, '03:00'), (4, '04:00'), (5, '05:00'), (6, '06:00'), (7, '07:00'), (8, '08:00'), (9, '09:00'), (10, '10:00'), (11, '11:00'), (12, '12:00'), (13, '13:00'), (14, '14:00'), (15, '15:00'), (16, '16:00'), (17, '17:00'), (18, '18:00'), (19, '19:00'), (20, '20:00'), (21, '21:00'), (22, '22:00'), (23, '23:00')], default=0)),
|
||||
('max_retry', models.IntegerField(choices=[(1, '1'), (2, '2'), (3, '3'), (4, '4'), (5, '5')], default=3)),
|
||||
('retry_interval', models.IntegerField(choices=[('1', '1 Minute'), ('15', '15 Minutes'), ('30', '30 Minutes'), ('60', '1 Hour')], default=30)),
|
||||
('backup_interval', models.IntegerField(choices=[(0, 'No interval'), (5, '5 seconds'), (60, '1 minute')], default=60)),
|
||||
('updated', models.DateTimeField(auto_now=True)),
|
||||
('created', models.DateTimeField(auto_now_add=True)),
|
||||
('uuid', models.UUIDField(default=uuid.uuid4, editable=False, unique=True)),
|
||||
],
|
||||
),
|
||||
]
|
Loading…
Add table
Add a link
Reference in a new issue