diff --git a/packages/models-library/src/models_library/resource_tracker.py b/packages/models-library/src/models_library/resource_tracker.py index 53e370913a9..c94755817b3 100644 --- a/packages/models-library/src/models_library/resource_tracker.py +++ b/packages/models-library/src/models_library/resource_tracker.py @@ -52,6 +52,7 @@ class CreditClassification(StrAutoEnum): class PricingPlanClassification(StrAutoEnum): TIER = auto() + LICENSE = auto() class PricingInfo(BaseModel): diff --git a/packages/postgres-database/src/simcore_postgres_database/migration/versions/4d007819e61a_add_license_type_to_pricing_plan.py b/packages/postgres-database/src/simcore_postgres_database/migration/versions/4d007819e61a_add_license_type_to_pricing_plan.py new file mode 100644 index 00000000000..03b117ca485 --- /dev/null +++ b/packages/postgres-database/src/simcore_postgres_database/migration/versions/4d007819e61a_add_license_type_to_pricing_plan.py @@ -0,0 +1,25 @@ +"""add LICENSE type to pricing plan + +Revision ID: 4d007819e61a +Revises: 38c9ac332c58 +Create Date: 2024-12-09 14:25:45.024814+00:00 + +""" +import sqlalchemy as sa +from alembic import op + +# revision identifiers, used by Alembic. +revision = "4d007819e61a" +down_revision = "38c9ac332c58" +branch_labels = None +depends_on = None + + +def upgrade(): + op.execute(sa.DDL("ALTER TYPE pricingplanclassification ADD VALUE 'LICENSE'")) + + +def downgrade(): + # ### commands auto generated by Alembic - please adjust! ### + pass + # ### end Alembic commands ### diff --git a/packages/postgres-database/src/simcore_postgres_database/models/resource_tracker_pricing_plans.py b/packages/postgres-database/src/simcore_postgres_database/models/resource_tracker_pricing_plans.py index e0e1c69efa6..70c9ec53e03 100644 --- a/packages/postgres-database/src/simcore_postgres_database/models/resource_tracker_pricing_plans.py +++ b/packages/postgres-database/src/simcore_postgres_database/models/resource_tracker_pricing_plans.py @@ -18,6 +18,7 @@ class PricingPlanClassification(str, enum.Enum): """ TIER = "TIER" + LICENSE = "LICENSE" resource_tracker_pricing_plans = sa.Table( diff --git a/services/api-server/openapi.json b/services/api-server/openapi.json index e04d4b41d32..ee8d7f9479d 100644 --- a/services/api-server/openapi.json +++ b/services/api-server/openapi.json @@ -6469,7 +6469,8 @@ "PricingPlanClassification": { "type": "string", "enum": [ - "TIER" + "TIER", + "LICENSE" ], "title": "PricingPlanClassification" }, diff --git a/services/resource-usage-tracker/openapi.json b/services/resource-usage-tracker/openapi.json index 91ee050d3d9..b267c3f0a9e 100644 --- a/services/resource-usage-tracker/openapi.json +++ b/services/resource-usage-tracker/openapi.json @@ -378,7 +378,8 @@ "PricingPlanClassification": { "type": "string", "enum": [ - "TIER" + "TIER", + "LICENSE" ], "title": "PricingPlanClassification" }, diff --git a/services/web/server/src/simcore_service_webserver/api/v0/openapi.yaml b/services/web/server/src/simcore_service_webserver/api/v0/openapi.yaml index 91516c62ee8..0ab1f87a5c1 100644 --- a/services/web/server/src/simcore_service_webserver/api/v0/openapi.yaml +++ b/services/web/server/src/simcore_service_webserver/api/v0/openapi.yaml @@ -11432,6 +11432,7 @@ components: type: string enum: - TIER + - LICENSE title: PricingPlanClassification PricingPlanToServiceAdminGet: properties: