Coverage for opt/mealie/lib/python3.12/site-packages/mealie/alembic/versions/2023-02-10-21.18.32_16160bf731a0_add_more_indices_necessary_for_search.py: 73%

15 statements  

« prev     ^ index     » next       coverage.py v7.10.6, created at 2025-12-05 13:45 +0000

1"""add more indices necessary for search 

2 

3Revision ID: 16160bf731a0 

4Revises: ff5f73b01a7a 

5Create Date: 2023-02-10 21:18:32.405130 

6 

7""" 

8 

9from alembic import op 1a

10 

11# revision identifiers, used by Alembic. 

12revision = "16160bf731a0" 1a

13down_revision = "ff5f73b01a7a" 1a

14branch_labels: str | tuple[str, ...] | None = None 1a

15depends_on: str | tuple[str, ...] | None = None 1a

16 

17 

18def upgrade(): 1a

19 # ### commands auto generated by Alembic - please adjust! ### 

20 op.create_index(op.f("ix_recipe_instructions_text"), "recipe_instructions", ["text"], unique=False) 1a

21 op.create_index(op.f("ix_recipes_description"), "recipes", ["description"], unique=False) 1a

22 op.create_index(op.f("ix_recipes_ingredients_note"), "recipes_ingredients", ["note"], unique=False) 1a

23 op.create_index( 1a

24 op.f("ix_recipes_ingredients_original_text"), "recipes_ingredients", ["original_text"], unique=False 

25 ) 

26 # ### end Alembic commands ### 

27 

28 

29def downgrade(): 1a

30 # ### commands auto generated by Alembic - please adjust! ### 

31 op.drop_index(op.f("ix_recipes_ingredients_original_text"), table_name="recipes_ingredients") 

32 op.drop_index(op.f("ix_recipes_ingredients_note"), table_name="recipes_ingredients") 

33 op.drop_index(op.f("ix_recipes_description"), table_name="recipes") 

34 op.drop_index(op.f("ix_recipe_instructions_text"), table_name="recipe_instructions") 

35 # ### end Alembic commands ###