blakeblackshear.frigate/migrations/016_sublabel_increase.py
Sergey Krashevich 03b45c153b
Increase maximum event sub_label length to 100 characters (#6350)
* Increase maximum sub label length to 100 characters and update corresponding fields in models and API

* black format...
2023-05-04 17:59:44 -05:00

13 lines
406 B
Python

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