File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed
internal-packages/database/prisma
migrations/20250814124843_add_organization_access_tokens Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change
1
+ CREATE TYPE "OrganizationAccessTokenType " AS ENUM (' USER' , ' SYSTEM' );
2
+
1
3
CREATE TABLE "OrganizationAccessToken " (
2
4
" id" TEXT NOT NULL ,
3
5
" name" TEXT NOT NULL ,
6
+ " type" " OrganizationAccessTokenType" NOT NULL DEFAULT ' USER' ,
4
7
" encryptedToken" JSONB NOT NULL ,
5
8
" obfuscatedToken" TEXT NOT NULL ,
6
9
" hashedToken" TEXT NOT NULL ,
Original file line number Diff line number Diff line change @@ -133,12 +133,20 @@ model PersonalAccessToken {
133
133
authorizationCodes AuthorizationCode []
134
134
}
135
135
136
+ enum OrganizationAccessTokenType {
137
+ USER
138
+ SYSTEM
139
+ }
140
+
136
141
model OrganizationAccessToken {
137
142
id String @id @default (cuid () )
138
143
139
144
/// User-provided name for the token
140
145
name String
141
146
147
+ /// Used to differentiate between user-generated and system-generated tokens
148
+ type OrganizationAccessTokenType @default (USER )
149
+
142
150
/// This is the token encrypted using the ENCRYPTION_KEY
143
151
encryptedToken Json
144
152
You can’t perform that action at this time.
0 commit comments