mirror of
https://github.com/flibusta-apps/book_library_server.git
synced 2025-12-06 15:15:36 +01:00
Add book_genres indexes
This commit is contained in:
@@ -104,6 +104,20 @@ def upgrade():
|
|||||||
unique=False,
|
unique=False,
|
||||||
postgresql_using="btree",
|
postgresql_using="btree",
|
||||||
)
|
)
|
||||||
|
op.create_index(
|
||||||
|
op.f("book_genres_book"),
|
||||||
|
"book_genres",
|
||||||
|
["book"],
|
||||||
|
unique=False,
|
||||||
|
postgresql_using="btree",
|
||||||
|
),
|
||||||
|
op.create_index(
|
||||||
|
op.f("book_genres_genre"),
|
||||||
|
"book_genres",
|
||||||
|
["genre"],
|
||||||
|
unique=False,
|
||||||
|
postgresql_using="btree",
|
||||||
|
)
|
||||||
# ### end Alembic commands ###
|
# ### end Alembic commands ###
|
||||||
|
|
||||||
|
|
||||||
@@ -124,4 +138,6 @@ def downgrade():
|
|||||||
op.drop_index(op.f("book_sequences_sequence"), table_name="book_sequences")
|
op.drop_index(op.f("book_sequences_sequence"), table_name="book_sequences")
|
||||||
op.drop_index(op.f("translations_book"), table_name="translations")
|
op.drop_index(op.f("translations_book"), table_name="translations")
|
||||||
op.drop_index(op.f("translations_author"), table_name="translations")
|
op.drop_index(op.f("translations_author"), table_name="translations")
|
||||||
|
op.drop_index(op.f("book_genres_book"), table_name="book_genres"),
|
||||||
|
op.drop_index(op.f("book_genres_genre"), table_name="book_genres"),
|
||||||
# ### end Alembic commands ###
|
# ### end Alembic commands ###
|
||||||
|
|||||||
Reference in New Issue
Block a user