-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/master' into pr-osparc-mypy-dy…
…-sidecar
- Loading branch information
Showing
4 changed files
with
303 additions
and
73 deletions.
There are no files selected for viewing
37 changes: 37 additions & 0 deletions
37
...imcore_postgres_database/migration/versions/617e0ecaf602_added_product_name_to_folders.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,37 @@ | ||
"""added product name to folders | ||
Revision ID: 617e0ecaf602 | ||
Revises: 21699ee569a7 | ||
Create Date: 2024-07-31 08:26:46.073511+00:00 | ||
""" | ||
import sqlalchemy as sa | ||
from alembic import op | ||
|
||
# revision identifiers, used by Alembic. | ||
revision = "617e0ecaf602" | ||
down_revision = "21699ee569a7" | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade(): | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.add_column("folders", sa.Column("product_name", sa.String(), nullable=False)) | ||
op.create_foreign_key( | ||
"fk_folders_to_products_name", | ||
"folders", | ||
"products", | ||
["product_name"], | ||
["name"], | ||
onupdate="CASCADE", | ||
ondelete="CASCADE", | ||
) | ||
# ### end Alembic commands ### | ||
|
||
|
||
def downgrade(): | ||
# ### commands auto generated by Alembic - please adjust! ### | ||
op.drop_constraint("fk_folders_to_products_name", "folders", type_="foreignkey") | ||
op.drop_column("folders", "product_name") | ||
# ### 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
Oops, something went wrong.