-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
marketplace: splittable sku for MW02702 (PROJQUAY-8151) (quay#3389)
* marketplace: splittable sku for MW02702 (PROJQUAY-8151) * Alembic migration to drop unique constraint on the orgrhsubscriptions table * Can split sub quantities of MW02702 across multiple orgs * Can specify quantity for the MW02702 SKU across orgs on react UI * Update angular UI to allow user to specify quantities for MW02702
- Loading branch information
Showing
12 changed files
with
250 additions
and
50 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
32 changes: 32 additions & 0 deletions
32
data/migrations/versions/3634f2df3c5b_drop_unique_constraint_on_org_sku_table.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,32 @@ | ||
"""drop unique constraint on org sku table | ||
Revision ID: 3634f2df3c5b | ||
Revises: 8e97c2cfee57 | ||
Create Date: 2024-11-04 14:14:21.736496 | ||
""" | ||
|
||
# revision identifiers, used by Alembic. | ||
revision = "3634f2df3c5b" | ||
down_revision = "8e97c2cfee57" | ||
|
||
import sqlalchemy as sa | ||
|
||
|
||
def upgrade(op, tables, tester): | ||
# Drop the existing unique index | ||
op.drop_index("organizationrhskus_subscription_id", table_name="organizationrhskus") | ||
op.create_index( | ||
"organizationrhskus_subscription_id", | ||
"organizationrhskus", | ||
["subscription_id"], | ||
unique=False, | ||
) | ||
|
||
|
||
def downgrade(op, tables, tester): | ||
# Re-add the unique index if we need to rollback | ||
op.drop_index("organizationrhskus_subscription_id", table_name="organizationrhskus") | ||
op.create_index( | ||
"organizationrhskus_subscription_id", "organizationrhskus", ["subscription_id"], unique=True | ||
) |
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
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
Oops, something went wrong.