kemono2/db/migrations/20231101_00_AMD325-add-key-dead-timestamp.py

15 lines
360 B
Python
Raw Normal View History

2024-07-04 22:08:17 +02:00
"""
Add date key is made dead
"""
from yoyo import step
__depends__ = {"20230909_00_AUS5i6-new-index-for-post-get-prev-next"}
steps = [
step(
"""ALTER TABLE public.saved_session_keys_with_hashes ADD dead_at timestamp NULL;"""
"""UPDATE public.saved_session_keys_with_hashes SET dead_at = CURRENT_TIMESTAMP WHERE dead = true;"""
),
]