-
Notifications
You must be signed in to change notification settings - Fork 1
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 #221 from ParkenDD/allow-realtime-opening-status-null
Allow Realtime Opening Status Null
- Loading branch information
Showing
4 changed files
with
64 additions
and
4 deletions.
There are no files selected for viewing
57 changes: 57 additions & 0 deletions
57
migrations/versions/2024-11-20-09-06-51_4f09ed999210_allow_realtime_opening_status_null.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,57 @@ | ||
"""allow realtime opening status null | ||
Revision ID: 4f09ed999210 | ||
Revises: 95992608c5d1 | ||
Create Date: 2024-11-20 09:06:51.525217 | ||
""" | ||
|
||
import sqlalchemy as sa | ||
from alembic import op | ||
from sqlalchemy.dialects import postgresql | ||
|
||
# revision identifiers, used by Alembic. | ||
revision = '4f09ed999210' | ||
down_revision = '95992608c5d1' | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade(): | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
with op.batch_alter_table('parking_site', schema=None) as batch_op: | ||
batch_op.alter_column( | ||
'realtime_opening_status', | ||
existing_type=postgresql.ENUM('OPEN', 'CLOSED', 'UNKNOWN', name='openingstatus'), | ||
nullable=True, | ||
) | ||
|
||
with op.batch_alter_table('parking_site_history', schema=None) as batch_op: | ||
batch_op.alter_column( | ||
'realtime_opening_status', | ||
existing_type=postgresql.ENUM('OPEN', 'CLOSED', 'UNKNOWN', name='history_openingstatus'), | ||
type_=sa.Enum('OPEN', 'CLOSED', 'UNKNOWN', name='history_openingstatus'), | ||
nullable=True, | ||
) | ||
|
||
# ### end Alembic commands ### | ||
|
||
|
||
def downgrade(): | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
with op.batch_alter_table('parking_site_history', schema=None) as batch_op: | ||
batch_op.alter_column( | ||
'realtime_opening_status', | ||
existing_type=sa.Enum('OPEN', 'CLOSED', 'UNKNOWN', name='history_openingstatus'), | ||
type_=postgresql.ENUM('OPEN', 'CLOSED', 'UNKNOWN', name='history_openingstatus'), | ||
nullable=False, | ||
) | ||
|
||
with op.batch_alter_table('parking_site', schema=None) as batch_op: | ||
batch_op.alter_column( | ||
'realtime_opening_status', | ||
existing_type=postgresql.ENUM('OPEN', 'CLOSED', 'UNKNOWN', name='openingstatus'), | ||
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