@dynamatix/gb-schemas 2.0.40 → 2.0.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Warnings:
|
|
3
|
+
|
|
4
|
+
- Changed the type of `role_id` on the `roles` table. No cast exists, the column would be dropped and recreated, which cannot be done if there is data, since the column is required.
|
|
5
|
+
|
|
6
|
+
*/
|
|
7
|
+
-- AlterTable
|
|
8
|
+
ALTER TABLE "roles" DROP COLUMN "role_id",
|
|
9
|
+
ADD COLUMN "role_id" INTEGER NOT NULL;
|
|
10
|
+
|
|
11
|
+
-- CreateIndex
|
|
12
|
+
CREATE UNIQUE INDEX "roles_role_id_key" ON "roles"("role_id");
|
package/prisma/schema.prisma
CHANGED
|
@@ -331,7 +331,7 @@ model RoleGroup {
|
|
|
331
331
|
// From prisma/users/role.prisma
|
|
332
332
|
model Role {
|
|
333
333
|
id String @id @default(uuid())
|
|
334
|
-
roleId
|
|
334
|
+
roleId Int @unique @map("role_id")
|
|
335
335
|
name String
|
|
336
336
|
description String?
|
|
337
337
|
createdAt DateTime @default(now()) @map("created_at")
|
|
@@ -339,7 +339,7 @@ model Role {
|
|
|
339
339
|
|
|
340
340
|
// Relations
|
|
341
341
|
permissions Permission[]
|
|
342
|
-
roleGroups RoleGroup[]
|
|
342
|
+
roleGroups RoleGroup[] @relation("RoleToRoleGroup")
|
|
343
343
|
|
|
344
344
|
@@map("roles")
|
|
345
345
|
}
|
package/prisma/users/role.prisma
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
model Role {
|
|
2
2
|
id String @id @default(uuid())
|
|
3
|
-
roleId
|
|
3
|
+
roleId Int @unique @map("role_id")
|
|
4
4
|
name String
|
|
5
5
|
description String?
|
|
6
6
|
createdAt DateTime @default(now()) @map("created_at")
|
|
@@ -8,7 +8,7 @@ model Role {
|
|
|
8
8
|
|
|
9
9
|
// Relations
|
|
10
10
|
permissions Permission[]
|
|
11
|
-
roleGroups RoleGroup[]
|
|
11
|
+
roleGroups RoleGroup[] @relation("RoleToRoleGroup")
|
|
12
12
|
|
|
13
13
|
@@map("roles")
|
|
14
|
-
}
|
|
14
|
+
}
|