1 """add more indices necessary for search
2
3 Revision ID: 16160bf731a0
4 Revises: ff5f73b01a7a
5 Create Date: 2023-02-10 21:18:32.405130
6
7 """
8
9 from alembic import op 1 ctx 1a
10
11 # revision identifiers, used by Alembic.
12 revision = "16160bf731a0" 1 ctx 1a
13 down_revision = "ff5f73b01a7a" 1 ctx 1a
14 branch_labels : str | tuple [ str , ... ] | None = None 1 ctx 1a
15 depends_on : str | tuple [ str , ... ] | None = None 1 ctx 1a
16
17
18 def upgrade ( ) : 1 ctx 1a
19 # ### commands auto generated by Alembic - please adjust! ###
20 op . create_index ( op . f ( "ix_recipe_instructions_text" ) , "recipe_instructions" , [ "text" ] , unique = False ) 1 ctx 1a
21 op . create_index ( op . f ( "ix_recipes_description" ) , "recipes" , [ "description" ] , unique = False ) 1 ctx 1a
22 op . create_index ( op . f ( "ix_recipes_ingredients_note" ) , "recipes_ingredients" , [ "note" ] , unique = False ) 1 ctx 1a
23 op . create_index ( 1 ctx 1a
24 op . f ( "ix_recipes_ingredients_original_text" ) , "recipes_ingredients" , [ "original_text" ] , unique = False
25 )
26 # ### end Alembic commands ###
27
28
29 def downgrade ( ) : 1 ctx 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 ###