-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add IIB_BINARY_IMAGE_CONFIG to IIB and make binary_image param optional
This commit introduces a new config variable called IIB_BINARY_IMAGE_CONFIG which when specified, doesn't require the user to specify binary_image param while submitting requests to IIB. Refers to CLOUDDST-2761
- Loading branch information
1 parent
4e326b6
commit c33e799
Showing
13 changed files
with
323 additions
and
89 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
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
38 changes: 38 additions & 0 deletions
38
iib/web/migrations/versions/60f89c046096_make_binary_image_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,38 @@ | ||
"""Make binary_image optional. | ||
Revision ID: 60f89c046096 | ||
Revises: 983a81fe5e98 | ||
Create Date: 2020-10-12 15:49:24.523019 | ||
""" | ||
from alembic import op | ||
import sqlalchemy as sa | ||
|
||
|
||
# revision identifiers, used by Alembic. | ||
revision = '60f89c046096' | ||
down_revision = '983a81fe5e98' | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade(): | ||
with op.batch_alter_table('request_add', schema=None) as batch_op: | ||
batch_op.alter_column('binary_image_id', existing_type=sa.INTEGER(), nullable=True) | ||
|
||
with op.batch_alter_table('request_merge_index_image', schema=None) as batch_op: | ||
batch_op.alter_column('binary_image_id', existing_type=sa.INTEGER(), nullable=True) | ||
|
||
with op.batch_alter_table('request_rm', schema=None) as batch_op: | ||
batch_op.alter_column('binary_image_id', existing_type=sa.INTEGER(), nullable=True) | ||
|
||
|
||
def downgrade(): | ||
with op.batch_alter_table('request_rm', schema=None) as batch_op: | ||
batch_op.alter_column('binary_image_id', existing_type=sa.INTEGER(), nullable=False) | ||
|
||
with op.batch_alter_table('request_merge_index_image', schema=None) as batch_op: | ||
batch_op.alter_column('binary_image_id', existing_type=sa.INTEGER(), nullable=False) | ||
|
||
with op.batch_alter_table('request_add', schema=None) as batch_op: | ||
batch_op.alter_column('binary_image_id', existing_type=sa.INTEGER(), nullable=False) |
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.