Skip to content

AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.

fix(backend): fix migration conflict with dev's SubscriptionTier migration

Zamil Majdy4eabc48053e2
diff --git a/autogpt_platform/backend/migrations/20260409000000_add_subscription_tier/migration.sql b/autogpt_platform/backend/migrations/20260409000000_add_subscription_tier/migration.sql
index 72872c1872..2240b450ec 100644
--- a/autogpt_platform/backend/migrations/20260409000000_add_subscription_tier/migration.sql
+++ b/autogpt_platform/backend/migrations/20260409000000_add_subscription_tier/migration.sql
@@ -1,8 +1,5 @@
--- CreateEnum
-CREATE TYPE "SubscriptionTier" AS ENUM ('FREE', 'PRO', 'BUSINESS', 'ENTERPRISE');
+-- SubscriptionTier enum and User.subscriptionTier column already created by
+-- 20260326200000_add_rate_limit_tier migration. Only add SUBSCRIPTION transaction type.
-- AlterEnum
-ALTER TYPE "CreditTransactionType" ADD VALUE 'SUBSCRIPTION';
-
--- AlterTable
-ALTER TABLE "User" ADD COLUMN "subscriptionTier" "SubscriptionTier" NOT NULL DEFAULT 'FREE';
+ALTER TYPE "CreditTransactionType" ADD VALUE IF NOT EXISTS 'SUBSCRIPTION';