mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-11-23 22:07:07 +03:00
16 lines
400 B
Python
16 lines
400 B
Python
"""Peewee migrations -- 041_remove_retain_indefinitely.py."""
|
|||
|
|
|
||
|
|
import peewee as pw
|
||
|
|
|
||
|
|
SQL = pw.SQL
|
||
|
|
|
||
|
|
|
||
|
|
def migrate(migrator, database, fake=False, **kwargs):
|
||
|
|
migrator.sql('ALTER TABLE "event" DROP COLUMN "retain_indefinitely"')
|
||
|
|
|
||
|
|
|
||
|
|
def rollback(migrator, database, fake=False, **kwargs):
|
||
|
|
migrator.sql(
|
||
|
|
'ALTER TABLE "event" ADD COLUMN "retain_indefinitely" INTEGER NOT NULL DEFAULT 0'
|
||
|
|
)
|