-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #151 from wguanicedew/dev
remove nullable=false constraints in messages table
- Loading branch information
Showing
5 changed files
with
54 additions
and
11 deletions.
There are no files selected for viewing
43 changes: 43 additions & 0 deletions
43
main/lib/idds/orm/base/alembic/versions/6ca0e5e466eb_update_message_null_constraints.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,43 @@ | ||
#!/usr/bin/env python | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# You may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# http://www.apache.org/licenses/LICENSE-2.0OA | ||
# | ||
# Authors: | ||
# - Wen Guan, <[email protected]>, 2023 | ||
|
||
"""update message null constraints | ||
Revision ID: 6ca0e5e466eb | ||
Revises: 5e0aa2aa1fa3 | ||
Create Date: 2023-04-25 16:58:29.975397+00:00 | ||
""" | ||
from alembic import op | ||
from alembic import context | ||
import sqlalchemy as sa | ||
|
||
|
||
# revision identifiers, used by Alembic. | ||
revision = '6ca0e5e466eb' | ||
down_revision = '5e0aa2aa1fa3' | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade() -> None: | ||
if context.get_context().dialect.name in ['oracle', 'mysql', 'postgresql']: | ||
schema = context.get_context().version_table_schema if context.get_context().version_table_schema else '' | ||
op.alter_column('messages', sa.Column('request_id'), nullable=True, schema=schema) | ||
op.alter_column('messages', sa.Column('transform_id'), nullable=True, schema=schema) | ||
op.alter_column('messages', sa.Column('processing_id'), nullable=True, schema=schema) | ||
|
||
|
||
def downgrade() -> None: | ||
if context.get_context().dialect.name in ['oracle', 'mysql', 'postgresql']: | ||
schema = context.get_context().version_table_schema if context.get_context().version_table_schema else '' | ||
op.alter_column('messages', sa.Column('request_id'), nullable=False, schema=schema) | ||
op.alter_column('messages', sa.Column('transform_id'), nullable=False, schema=schema) | ||
op.alter_column('messages', sa.Column('processing_id'), nullable=False, schema=schema) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
|
||
var appConfig = { | ||
'iddsAPI_request': "https://lxplus807.cern.ch:443/idds/monitor_request/null/null", | ||
'iddsAPI_transform': "https://lxplus807.cern.ch:443/idds/monitor_transform/null/null", | ||
'iddsAPI_processing': "https://lxplus807.cern.ch:443/idds/monitor_processing/null/null", | ||
'iddsAPI_request_detail': "https://lxplus807.cern.ch:443/idds/monitor/null/null/true/false/false", | ||
'iddsAPI_transform_detail': "https://lxplus807.cern.ch:443/idds/monitor/null/null/false/true/false", | ||
'iddsAPI_processing_detail': "https://lxplus807.cern.ch:443/idds/monitor/null/null/false/false/true" | ||
'iddsAPI_request': "https://lxplus810.cern.ch:443/idds/monitor_request/null/null", | ||
'iddsAPI_transform': "https://lxplus810.cern.ch:443/idds/monitor_transform/null/null", | ||
'iddsAPI_processing': "https://lxplus810.cern.ch:443/idds/monitor_processing/null/null", | ||
'iddsAPI_request_detail': "https://lxplus810.cern.ch:443/idds/monitor/null/null/true/false/false", | ||
'iddsAPI_transform_detail': "https://lxplus810.cern.ch:443/idds/monitor/null/null/false/true/false", | ||
'iddsAPI_processing_detail': "https://lxplus810.cern.ch:443/idds/monitor/null/null/false/false/true" | ||
} |