Skip to content

Commit

Permalink
fix: alembic revision autogenerate script (#4069)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
edwinjosechittilappilly and jordanrfrazier authored Oct 9, 2024
1 parent 09fbcb2 commit f6e09da
Showing 1 changed file with 39 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -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 ###

0 comments on commit f6e09da

Please sign in to comment.