fix: alembic revision autogenerate script (#4069)

* update

Autogenerated code for alembic update

run alembic revision --autogenerate

* updated script

run alembic revision --autogenerate -m

* Update e4aaf16201c2_update_description_columns_type_errors.py

updated the reviews and checks if the table exists or not.

* update

Autogenerated code for alembic update

run alembic revision --autogenerate

* updated script

run alembic revision --autogenerate -m

* Update e4aaf16201c2_update_description_columns_type_errors.py

updated the reviews and checks if the table exists or not.

* replace revision

* Delete e4aaf16201c2_update_description_columns_type_errors.py

* Update 5ace73a7f223_new_remove_table_upgrade_op.py

making relevant change to remove vertex_build related upgrades and downgrades.

---------

Co-authored-by: Jordan Frazier <jordan.frazier@datastax.com>
This commit is contained in:
Edwin Jose 2024-10-09 12:17:17 -04:00 committed by GitHub
commit f6e09dacb3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -0,0 +1,39 @@
"""new remove table upgrade op
Revision ID: 5ace73a7f223
Revises: 0ae3a2674f32
Create Date: 2024-10-08 10:59:12.980671
"""
from typing import Sequence, Union
from alembic import op
import sqlalchemy as sa
import sqlmodel
from sqlalchemy.engine.reflection import Inspector
from langflow.utils import migration
from sqlalchemy.dialects import sqlite
from langflow.utils import migration
# revision identifiers, used by Alembic.
revision: str = "5ace73a7f223"
down_revision: Union[str, None] = "0ae3a2674f32"
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None
def upgrade() -> None:
with op.batch_alter_table("message", schema=None) as batch_op:
batch_op.alter_column("text", existing_type=sa.TEXT(), nullable=True)
# ### end Alembic commands ###
def downgrade() -> None:
# ### commands auto generated by Alembic - please adjust! ###
with op.batch_alter_table("message", schema=None) as batch_op:
batch_op.alter_column("text", existing_type=sa.TEXT(), nullable=False)
# ### end Alembic commands ###