diff --git a/gso/migrations/versions/2024-11-04_e854e0c35e20_update_lan_switch_interconnect.py b/gso/migrations/versions/2024-11-04_e854e0c35e20_update_lan_switch_interconnect.py index 60a4438f9c195ef714e44a58788a553eff87b0f0..71b2874c06ed054fb2d65f6c933aa8275f2048ef 100644 --- a/gso/migrations/versions/2024-11-04_e854e0c35e20_update_lan_switch_interconnect.py +++ b/gso/migrations/versions/2024-11-04_e854e0c35e20_update_lan_switch_interconnect.py @@ -1,7 +1,7 @@ """Update LAN Switch Interconnect. Revision ID: e854e0c35e20 -Revises: 28c1723c6a00 +Revises: 79192e72131c Create Date: 2024-11-04 17:21:14.612740 """ @@ -10,7 +10,7 @@ from alembic import op # revision identifiers, used by Alembic. revision = 'e854e0c35e20' -down_revision = '28c1723c6a00' +down_revision = '79192e72131c' branch_labels = None depends_on = None diff --git a/gso/migrations/versions/2024-12-04_4cc835c615fc_remove_additional_products.py b/gso/migrations/versions/2024-12-04_4cc835c615fc_remove_additional_products.py deleted file mode 100644 index 969e1e0fc20d437b400a69ef670c46ad5ed0e059..0000000000000000000000000000000000000000 --- a/gso/migrations/versions/2024-12-04_4cc835c615fc_remove_additional_products.py +++ /dev/null @@ -1,33 +0,0 @@ -"""remove additional products. - -Revision ID: 4cc835c615fc -Revises: 28c1723c6a00 -Create Date: 2024-12-04 14:54:22.167158 - -""" -import sqlalchemy as sa -from alembic import op - -# revision identifiers, used by Alembic. -revision = '4cc835c615fc' -down_revision = '28c1723c6a00' -branch_labels = None -depends_on = None - - -def upgrade() -> None: - conn = op.get_bind() - conn.execute(sa.text(""" -DELETE FROM product_product_blocks WHERE product_product_blocks.product_id IN (SELECT products.product_id FROM products WHERE products.name IN ('IAS', 'Imported IAS', 'Imported GÉANT IP', 'GÉANT IP')) AND product_product_blocks.product_block_id IN (SELECT product_blocks.product_block_id FROM product_blocks WHERE product_blocks.name IN ('NRENL3CoreServiceBlock')) - """)) - conn.execute(sa.text(""" -DELETE FROM subscription_instances WHERE subscription_instances.product_block_id IN (SELECT product_blocks.product_block_id FROM product_blocks WHERE product_blocks.name IN ('NRENAccessPort', 'NRENL3CoreServiceBlock')) - """)) - conn.execute(sa.text(""" -DELETE FROM product_blocks WHERE product_blocks.name IN ('NRENAccessPort', 'NRENL3CoreServiceBlock') - """)) - - -def downgrade() -> None: - conn = op.get_bind() - diff --git a/gso/migrations/versions/2024-12-04_e358efe9ab03_rename_iptrunk_and_iptrunk_side_sid_and_.py b/gso/migrations/versions/2024-12-04_e358efe9ab03_rename_iptrunk_and_iptrunk_side_sid_and_.py index 63bc63a7415d408708438e1b110e5721c5b50090..db1e58b724e0ec753365e89c9c36959750269106 100644 --- a/gso/migrations/versions/2024-12-04_e358efe9ab03_rename_iptrunk_and_iptrunk_side_sid_and_.py +++ b/gso/migrations/versions/2024-12-04_e358efe9ab03_rename_iptrunk_and_iptrunk_side_sid_and_.py @@ -1,7 +1,7 @@ """Rename iptrunk and iptrunk side sid and gid. Revision ID: e358efe9ab03 -Revises: 4cc835c615fc +Revises: 28c1723c6a00 Create Date: 2024-12-04 15:05:46.356709 """ @@ -10,7 +10,7 @@ from alembic import op # revision identifiers, used by Alembic. revision = 'e358efe9ab03' -down_revision = '4cc835c615fc' +down_revision = '28c1723c6a00' branch_labels = None depends_on = None