File tree Expand file tree Collapse file tree 3 files changed +13
-0
lines changed
internal-packages/database/prisma
migrations/20260226120000_add_onboarding_data_to_organization Expand file tree Collapse file tree 3 files changed +13
-0
lines changed Original file line number Diff line number Diff line change 11import type {
22 Organization ,
33 OrgMember ,
4+ Prisma ,
45 Project ,
56 RuntimeEnvironment ,
67 User ,
@@ -22,8 +23,12 @@ export async function createOrganization(
2223 title,
2324 userId,
2425 companySize,
26+ onboardingData,
27+ avatar,
2528 } : Pick < Organization , "title" | "companySize" > & {
2629 userId : User [ "id" ] ;
30+ onboardingData ?: Prisma . InputJsonValue ;
31+ avatar ?: Prisma . InputJsonValue ;
2732 } ,
2833 attemptCount = 0
2934) : Promise < Organization > {
@@ -47,6 +52,8 @@ export async function createOrganization(
4752 title,
4853 userId,
4954 companySize,
55+ onboardingData,
56+ avatar,
5057 } ,
5158 attemptCount + 1
5259 ) ;
@@ -59,6 +66,8 @@ export async function createOrganization(
5966 title,
6067 slug : uniqueOrgSlug ,
6168 companySize,
69+ onboardingData : onboardingData ?? undefined ,
70+ avatar : avatar ?? undefined ,
6271 maximumConcurrencyLimit : env . DEFAULT_ORG_EXECUTION_CONCURRENCY_LIMIT ,
6372 members : {
6473 create : {
Original file line number Diff line number Diff line change 1+ -- AlterTable
2+ ALTER TABLE " public" ." Organization" ADD COLUMN " onboardingData" JSONB;
Original file line number Diff line number Diff line change @@ -191,6 +191,8 @@ model Organization {
191191
192192 companySize String ?
193193
194+ onboardingData Json ?
195+
194196 avatar Json ?
195197
196198 runsEnabled Boolean @default (true )
You can’t perform that action at this time.
0 commit comments