"""
Add index to tags and change to citext
"""

from yoyo import step

__depends__ = {"20231115_00_TAI3e31-add-deleted_at-to-comments"}

steps = [
    step("""CREATE EXTENSION IF NOT EXISTS citext;"""),
    step("""ALTER TABLE public.posts ALTER COLUMN tags TYPE _CITEXT;"""),
    step("""CREATE INDEX IF NOT EXISTS posts_tags_idx ON public.posts USING gin(tags);"""),
]
