forked from ScoDoc/ScoDoc
42 lines
1.2 KiB
Python
42 lines
1.2 KiB
Python
|
"""news index
|
||
|
|
||
|
Revision ID: af77ca6a89d0
|
||
|
Revises: e97b2a10f86c
|
||
|
Create Date: 2022-04-26 12:56:22.862451
|
||
|
|
||
|
"""
|
||
|
from alembic import op
|
||
|
import sqlalchemy as sa
|
||
|
|
||
|
|
||
|
# revision identifiers, used by Alembic.
|
||
|
revision = "af77ca6a89d0"
|
||
|
down_revision = "3c31bb0b27c9"
|
||
|
branch_labels = None
|
||
|
depends_on = None
|
||
|
|
||
|
|
||
|
def upgrade():
|
||
|
# ### commands auto generated by Alembic - please adjust! ###
|
||
|
op.create_index(
|
||
|
op.f("ix_scolar_news_authenticated_user"),
|
||
|
"scolar_news",
|
||
|
["authenticated_user"],
|
||
|
unique=False,
|
||
|
)
|
||
|
op.create_index(op.f("ix_scolar_news_date"), "scolar_news", ["date"], unique=False)
|
||
|
op.create_index(
|
||
|
op.f("ix_scolar_news_object"), "scolar_news", ["object"], unique=False
|
||
|
)
|
||
|
op.create_index(op.f("ix_scolar_news_type"), "scolar_news", ["type"], unique=False)
|
||
|
# ### end Alembic commands ###
|
||
|
|
||
|
|
||
|
def downgrade():
|
||
|
# ### commands auto generated by Alembic - please adjust! ###
|
||
|
op.drop_index(op.f("ix_scolar_news_type"), table_name="scolar_news")
|
||
|
op.drop_index(op.f("ix_scolar_news_object"), table_name="scolar_news")
|
||
|
op.drop_index(op.f("ix_scolar_news_date"), table_name="scolar_news")
|
||
|
op.drop_index(op.f("ix_scolar_news_authenticated_user"), table_name="scolar_news")
|
||
|
# ### end Alembic commands ###
|