kemono2/db/migrations/20230408_00_FLSD-add-post-incomplete-rewards.py

22 lines
532 B
Python
Raw Normal View History

2024-07-04 21:57:05 +02:00
"""
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)
);
"""
)
]