mirror of
https://github.com/danswer-ai/danswer.git
synced 2025-06-03 03:31:09 +02:00
Fix Tag Document Source Enum (#1240)
This commit is contained in:
parent
6a776648b3
commit
d66b6c0559
@ -0,0 +1,36 @@
|
||||
"""Remove DocumentSource from Tag
|
||||
|
||||
Revision ID: 91fd3b470d1a
|
||||
Revises: 173cae5bba26
|
||||
Create Date: 2024-03-21 12:05:23.956734
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
from danswer.configs.constants import DocumentSource
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = "91fd3b470d1a"
|
||||
down_revision = "173cae5bba26"
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
op.alter_column(
|
||||
"tag",
|
||||
"source",
|
||||
type_=sa.String(length=50),
|
||||
existing_type=sa.Enum(DocumentSource, native_enum=False),
|
||||
existing_nullable=False,
|
||||
)
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
op.alter_column(
|
||||
"tag",
|
||||
"source",
|
||||
type_=sa.Enum(DocumentSource, native_enum=False),
|
||||
existing_type=sa.String(length=50),
|
||||
existing_nullable=False,
|
||||
)
|
Loading…
x
Reference in New Issue
Block a user