kemono2/db/migrations/20240131_00_SHI55-extend-lookup.py
2024-07-04 22:08:17 +02:00

17 lines
394 B
Python

"""
Add fields to lookup
"""
from yoyo import step
__depends__ = {'20231119_00_ASHrR6-fix-revisions-table-to-match-tags-type'}
steps = [
step("""
ALTER TABLE public.lookup ADD COLUMN public_id TEXT;
ALTER TABLE public.lookup ADD COLUMN relation_id INTEGER;
CREATE SEQUENCE lookup_relation_id_seq;
CREATE INDEX lookup_relation_id_index ON public.lookup USING btree (relation_id);
"""),
]