frigate/migrations/016_sublabel_increase.py
Martin Weinelt 6ba70aa9bf
Update peewee-migrate to 0.14.x
Replaces two functions calls, that were deprecated and aliases for the
new function name:

- Migrator.python -> Migration.run
- Migrator.change_column -> Migrator.change_field
2025-12-12 16:38:02 +01:00

12 lines
338 B
Python

import peewee as pw
from frigate.models import Event
def migrate(migrator, database, fake=False, **kwargs):
migrator.change_fields(Event, sub_label=pw.CharField(max_length=100, null=True))
def rollback(migrator, database, fake=False, **kwargs):
migrator.change_fields(Event, sub_label=pw.CharField(max_length=20, null=True))