2022-01-12 06:24:03 +00:00
|
|
|
# Generated by database migrator
|
|
|
|
import peewee
|
|
|
|
from app.classes.models.management import Schedules
|
|
|
|
|
2022-03-23 02:50:12 +00:00
|
|
|
|
2022-01-12 06:24:03 +00:00
|
|
|
def migrate(migrator, database, **kwargs):
|
2022-03-23 02:50:12 +00:00
|
|
|
migrator.drop_columns("backups", ["schedule_id"])
|
2022-01-12 06:24:03 +00:00
|
|
|
"""
|
|
|
|
Write your migrations here.
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
|
|
def rollback(migrator, database, **kwargs):
|
2022-03-23 02:50:12 +00:00
|
|
|
migrator.add_columns(
|
|
|
|
"backups",
|
|
|
|
schedule_id=peewee.ForeignKeyField(Schedules, backref="backups_schedule"),
|
|
|
|
)
|
2022-01-12 06:24:03 +00:00
|
|
|
"""
|
|
|
|
Write your rollback migrations here.
|
|
|
|
"""
|