-
Notifications
You must be signed in to change notification settings - Fork 5
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 #196 from mgcam/drop_json_props_column
Dropped column 'properties' from sub_product db table.
- Loading branch information
Showing
4 changed files
with
53 additions
and
9 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
"""drop_json_properties_column | ||
Revision ID: 2.0.0 | ||
Revises: 3814003a709a | ||
Create Date: 2024-02-20 10:51:40.326882 | ||
""" | ||
from alembic import op | ||
|
||
# revision identifiers, used by Alembic. | ||
revision = "2.0.0" | ||
down_revision = "3814003a709a" | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade() -> None: | ||
sql = """ | ||
ALTER TABLE sub_product DROP COLUMN properties | ||
""" | ||
op.execute(sql) | ||
|
||
|
||
def downgrade() -> None: | ||
sql = """ | ||
ALTER TABLE sub_product ADD COLUMN properties JSON DEFAULT NULL AFTER value_attr_three | ||
""" | ||
op.execute(sql) | ||
pass |
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