kemono2/db/migrations/20230408_00_FLSD-add-post-incomplete-rewards.py
2024-07-04 22:08:17 +02:00

22 lines
532 B
Python

"""
Add table for incomplete posts
"""
from yoyo import step
__depends__ = {"20230124_01_aT7eI-add-welcome-message-table"}
steps = [
step(
"""
CREATE TABLE posts_incomplete_rewards (
id varchar(255) NOT NULL,
service varchar(20) NOT NULL,
last_checked_at timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
incomplete_attachments_info jsonb NOT NULL DEFAULT '{}'::jsonb,
CONSTRAINT posts_incomplete_rewards_pkey PRIMARY KEY (id, service)
);
"""
)
]