-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
creates pydantic model and updates deployment orm model
- Loading branch information
1 parent
746bbe6
commit 346bdfb
Showing
6 changed files
with
111 additions
and
4 deletions.
There are no files selected for viewing
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
32 changes: 32 additions & 0 deletions
32
...ons/postgresql/2024_09_06_170843_3b4bc664921d_change_deployment_concurrency_limit_type.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,32 @@ | ||
"""change deployment concurrency limit type | ||
Revision ID: 3b4bc664921d | ||
Revises: 97429116795e | ||
Create Date: 2024-09-06 17:08:43.236854 | ||
""" | ||
from alembic import op | ||
import sqlalchemy as sa | ||
import prefect | ||
from sqlalchemy.dialects import postgresql | ||
|
||
# revision identifiers, used by Alembic. | ||
revision = '3b4bc664921d' | ||
down_revision = '97429116795e' | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
|
||
|
||
def upgrade(): | ||
op.alter_column('deployment', 'concurrency_limit', | ||
existing_type=sa.INTEGER(), | ||
type_=prefect.server.utilities.database.Pydantic(), | ||
existing_nullable=True) | ||
|
||
def downgrade(): | ||
op.alter_column('deployment', 'concurrency_limit', | ||
existing_type=prefect.server.utilities.database.Pydantic(), | ||
type_=sa.INTEGER(), | ||
existing_nullable=True) |
35 changes: 35 additions & 0 deletions
35
...ersions/sqlite/2024_09_06_163202_78bf051472eb_change_deployment_concurrency_limit_type.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,35 @@ | ||
"""change deployment concurrency limit type | ||
Revision ID: 78bf051472eb | ||
Revises: f93e1439f022 | ||
Create Date: 2024-09-06 16:32:02.584968 | ||
""" | ||
from alembic import op | ||
import sqlalchemy as sa | ||
import prefect | ||
from sqlalchemy.dialects import sqlite | ||
from prefect.server.schemas.core import ConcurrencyOptions | ||
|
||
# revision identifiers, used by Alembic. | ||
revision = '78bf051472eb' | ||
down_revision = 'f93e1439f022' | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
|
||
|
||
def upgrade(): | ||
with op.batch_alter_table('deployment', schema=None) as batch_op: | ||
batch_op.alter_column('concurrency_limit', | ||
existing_type=sa.INTEGER(), | ||
type_=prefect.server.utilities.database.Pydantic(ConcurrencyOptions), | ||
existing_nullable=True) | ||
|
||
def downgrade(): | ||
with op.batch_alter_table('deployment', schema=None) as batch_op: | ||
batch_op.alter_column('concurrency_limit', | ||
existing_type=prefect.server.utilities.database.Pydantic(ConcurrencyOptions), | ||
type_=sa.INTEGER(), | ||
existing_nullable=True) |
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