mirror of
https://github.com/flibusta-apps/book_library_server.git
synced 2026-03-03 15:10:51 +01:00
Add random endpoints
This commit is contained in:
@@ -20,6 +20,11 @@ def upgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.create_index(op.f('ix_books_title'), 'books', ['title'], unique=False)
|
||||
op.create_index(op.f('ix_sequences_name'), 'sequences', ['name'], unique=False)
|
||||
op.create_index(op.f('tgrm_books_title'), 'books', ['title'], postgresql_using='gin', postgresql_ops={'description': 'gin_trgm_ops'})
|
||||
op.create_index(op.f('tgrm_sequences_name'), 'sequences', ['name'], postgresql_using='gin', postgresql_ops={'description': 'gin_trgm_ops'})
|
||||
op.create_index(op.f('tgrm_authors_lfm'), 'authors', [sa.text("(last_name || ' ' || first_name || ' ' || middle_name)")] ,postgresql_using='gin', postgresql_ops={'description': 'gin_trgm_ops'})
|
||||
op.create_index(op.f('tgrm_authors_lf'), 'authors', [sa.text("(last_name || ' ' || first_name)")] ,postgresql_using='gin', postgresql_ops={'description': 'gin_trgm_ops'})
|
||||
op.create_index(op.f('tgrm_authors_l'), 'authors', ['last_name'] ,postgresql_using='gin', postgresql_ops={'description': 'gin_trgm_ops'})
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
@@ -27,4 +32,9 @@ def downgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.drop_index(op.f('ix_sequences_name'), table_name='sequences')
|
||||
op.drop_index(op.f('ix_books_title'), table_name='books')
|
||||
op.drop_index(op.f('tgrm_books_title'), table_name='books')
|
||||
op.drop_index(op.f('tgrm_sequences_name'), table_name='books')
|
||||
op.drop_index(op.f('tgrm_authors_lfm'), table_name='books')
|
||||
op.drop_index(op.f('tgrm_authors_lf'), table_name='books')
|
||||
op.drop_index(op.f('tgrm_authors_l'), table_name='books')
|
||||
# ### end Alembic commands ###
|
||||
|
||||
Reference in New Issue
Block a user