-
Notifications
You must be signed in to change notification settings - Fork 516
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
846 additions
and
5,660 deletions.
There are no files selected for viewing
41 changes: 41 additions & 0 deletions
41
src/dispatch/database/revisions/tenant/versions/2023-10-23_f2605bfc1f59.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
"""Adds search vector column to the signal instance model | ||
Revision ID: f2605bfc1f59 | ||
Revises: 064c71206256 | ||
Create Date: 2023-10-23 11:15:53.297563 | ||
""" | ||
from alembic import op | ||
import sqlalchemy as sa | ||
import sqlalchemy_utils | ||
|
||
# revision identifiers, used by Alembic. | ||
revision = "f2605bfc1f59" | ||
down_revision = "064c71206256" | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade(): | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.add_column( | ||
"signal_instance", | ||
sa.Column("search_vector", sqlalchemy_utils.types.ts_vector.TSVectorType(), nullable=True), | ||
) | ||
op.create_index( | ||
"signal_instance_search_vector_idx", | ||
"signal_instance", | ||
["search_vector"], | ||
unique=False, | ||
postgresql_using="gin", | ||
) | ||
# ### end Alembic commands ### | ||
|
||
|
||
def downgrade(): | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.drop_index( | ||
"signal_instance_search_vector_idx", table_name="signal_instance", postgresql_using="gin" | ||
) | ||
op.drop_column("signal_instance", "search_vector") | ||
# ### end Alembic commands ### |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.