-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* [change] bump pydantic to v2 and sqlmodel to latest * [change] bump ver * [change] appease tests * [change] use sa_type, sa_column_args and sa_column_kwargs instead of sa_column * [change] pydantic ver to 2.5
- Loading branch information
1 parent
cd6a12e
commit 2b4f13a
Showing
10 changed files
with
216 additions
and
98 deletions.
There are no files selected for viewing
33 changes: 33 additions & 0 deletions
33
alembic/versions/2023_12_04_1619-70e5e82e94c0_column_changes_following_pydantic_.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,33 @@ | ||
"""column changes following pydantic upgrade to 2.0 | ||
Revision ID: 70e5e82e94c0 | ||
Revises: 46c271f8f06f # noqa: W291 | ||
Create Date: 2023-12-04 16:19:45.970626 | ||
""" | ||
import pgvector.sqlalchemy | ||
import sqlalchemy as sa | ||
|
||
from alembic import op | ||
|
||
# revision identifiers, used by Alembic. | ||
revision = "70e5e82e94c0" | ||
down_revision = "46c271f8f06f" | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade() -> None: | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.alter_column("article", "site", existing_type=sa.VARCHAR(), nullable=False) | ||
op.alter_column("embedding", "vector", existing_type=pgvector.sqlalchemy.Vector(dim=384), nullable=False) | ||
op.alter_column("page", "url", existing_type=sa.VARCHAR(), nullable=False) | ||
# ### end Alembic commands ### | ||
|
||
|
||
def downgrade() -> None: | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.alter_column("page", "url", existing_type=sa.VARCHAR(), nullable=True) | ||
op.alter_column("embedding", "vector", existing_type=pgvector.sqlalchemy.Vector(dim=384), nullable=True) | ||
op.alter_column("article", "site", existing_type=sa.VARCHAR(), nullable=True) | ||
# ### 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
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
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
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.