Skip to content

There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.

feat(server): team quota migration (#9081)

darkskygit36a95463b459
diff --git a/packages/backend/server/src/data/migrations/1733804966417-team-quota.ts b/packages/backend/server/src/data/migrations/1733804966417-team-quota.ts
new file mode 100644
index 0000000000..6fa3ca105d
--- /dev/null
+++ b/packages/backend/server/src/data/migrations/1733804966417-team-quota.ts
@@ -0,0 +1,14 @@
+import { PrismaClient } from '@prisma/client';
+
+import { QuotaType } from '../../core/quota';
+import { upsertLatestQuotaVersion } from './utils/user-quotas';
+
+export class TeamQuota1733804966417 {
+ // do the migration
+ static async up(db: PrismaClient) {
+ await upsertLatestQuotaVersion(db, QuotaType.TeamPlanV1);
+ }
+
+ // revert the migration
+ static async down(_db: PrismaClient) {}
+}