23 lines
580 B
Python
23 lines
580 B
Python
"""
|
|
Add table complete_imports
|
|
"""
|
|
|
|
from yoyo import step
|
|
|
|
__depends__ = {"20230507_00_d10V9-add-service-to-post-incomplete-rewards"}
|
|
|
|
steps = [
|
|
step(
|
|
"""
|
|
CREATE TABLE complete_imports (
|
|
user_id varchar(255) NOT NULL,
|
|
service varchar(20) NOT NULL,
|
|
subscription varchar(255) NOT NULL,
|
|
last_successful_at timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
info jsonb NOT NULL DEFAULT '{}'::jsonb,
|
|
CONSTRAINT complete_imports_pkey PRIMARY KEY (user_id, service, subscription)
|
|
);
|
|
"""
|
|
),
|
|
]
|