kemono2/db/migrations/20240210_00_gto81-add-table-for-tracking-forced-reimports.py

21 lines
443 B
Python
Raw Normal View History

2024-07-04 21:57:05 +02:00
"""
table to track forced reimports already done
"""
from yoyo import step
__depends__ = {'20240128_00_ANI72-add-resuming_at-to-jobs'}
steps = [
step("""
CREATE TABLE public.posts_forced_reimports (
creator_id TEXT NOT NULL,
service TEXT NOT NULL,
post_id TEXT NOT NULL,
reason TEXT NULL,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
CONSTRAINT posts_forced_reimports_pkey PRIMARY KEY (creator_id, service, post_id)
);
"""),
]