2021-08-04 15:29:56 +08:00
|
|
|
"""empty message
|
|
|
|
|
|
|
|
Revision ID: 9014cca7097c
|
|
|
|
Revises: ffa75d04e6ef
|
|
|
|
Create Date: 2021-08-04 09:28:26.620053
|
|
|
|
|
|
|
|
"""
|
|
|
|
import sqlalchemy_utils
|
|
|
|
from alembic import op
|
|
|
|
import sqlalchemy as sa
|
|
|
|
|
|
|
|
|
|
|
|
# revision identifiers, used by Alembic.
|
|
|
|
revision = '9014cca7097c'
|
|
|
|
down_revision = 'ffa75d04e6ef'
|
|
|
|
branch_labels = None
|
|
|
|
depends_on = None
|
|
|
|
|
|
|
|
|
|
|
|
def upgrade():
|
|
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
2021-08-04 15:33:02 +08:00
|
|
|
op.add_column('alias', sa.Column('ts_vector', "ts_vector", sa.Computed("to_tsvector('english', note)", persisted=True), nullable=True))
|
2021-08-04 15:29:56 +08:00
|
|
|
op.create_index('ix_video___ts_vector__', 'alias', ['ts_vector'], unique=False, postgresql_using='gin')
|
|
|
|
# ### end Alembic commands ###
|
|
|
|
|
|
|
|
|
|
|
|
def downgrade():
|
|
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
|
|
op.drop_index('ix_video___ts_vector__', table_name='alias')
|
|
|
|
op.drop_column('alias', 'ts_vector')
|
|
|
|
# ### end Alembic commands ###
|