kemono2/db/migrations/20210611_01_jpGYN-add-update-index.py
2024-07-04 21:57:05 +02:00

13 lines
344 B
Python

"""
Add update index
"""
from yoyo import step
__depends__ = {"20210610_01_w7oGH-add-updated-field-to-lookup-table"}
steps = [
step("DROP INDEX updated_idx", 'CREATE INDEX updated_idx ON posts USING btree ("user", "service", "added")'),
step('CREATE INDEX updated_idx ON lookup USING btree ("updated")', "DROP INDEX updated_idx"),
]