-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: set correlation id column as optional (#88)
* fix: set correlation_id as optional value * fix: sdk - set correlation id field as optional
- Loading branch information
Showing
10 changed files
with
96 additions
and
12 deletions.
There are no files selected for viewing
42 changes: 42 additions & 0 deletions
42
api/alembic/versions/3ec04e609ae9_set_correlation_id_optional.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,42 @@ | ||
"""set_correlation_id_optional | ||
Revision ID: 3ec04e609ae9 | ||
Revises: 086f26392cc4 | ||
Create Date: 2024-07-08 10:28:35.068312 | ||
""" | ||
from typing import Sequence, Union, Text | ||
|
||
from alembic import op | ||
import sqlalchemy as sa | ||
|
||
|
||
# revision identifiers, used by Alembic. | ||
revision: str = '3ec04e609ae9' | ||
down_revision: Union[str, None] = '086f26392cc4' | ||
branch_labels: Union[str, Sequence[str], None] = None | ||
depends_on: Union[str, Sequence[str], None] = None | ||
|
||
|
||
def upgrade() -> None: | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.alter_column('current_dataset', 'CORRELATION_ID_COLUMN', | ||
existing_type=sa.VARCHAR(), | ||
nullable=True) | ||
op.create_unique_constraint(None, 'current_dataset', ['UUID']) | ||
op.create_unique_constraint(None, 'current_dataset_metrics', ['UUID']) | ||
op.create_unique_constraint(None, 'reference_dataset', ['UUID']) | ||
op.create_unique_constraint(None, 'reference_dataset_metrics', ['UUID']) | ||
# ### end Alembic commands ### | ||
|
||
|
||
def downgrade() -> None: | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.drop_constraint(None, 'reference_dataset_metrics', type_='unique') | ||
op.drop_constraint(None, 'reference_dataset', type_='unique') | ||
op.drop_constraint(None, 'current_dataset_metrics', type_='unique') | ||
op.drop_constraint(None, 'current_dataset', type_='unique') | ||
op.alter_column('current_dataset', 'CORRELATION_ID_COLUMN', | ||
existing_type=sa.VARCHAR(), | ||
nullable=False) | ||
# ### 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
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