UserPermission and GroupPermission models (#5860)
* fix: rename to group_permissions * fix: delete null collectionId records before setting non null constraint * fix: use scope with collectionId not null * fix: update model with documentId * fix: rename to GroupPermission * fix: rename collection_users to user_permissions * fix: teamPermanentDeleter test * fix: use scope with collectionId not null * fix: update model with documentId * fix: rename to UserPermission * fix: create views upon table rename for zero downtime * fix: remove comments
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { CollectionPermission, UserRole } from "@shared/types";
|
||||
import { CollectionUser } from "@server/models";
|
||||
import { UserPermission } from "@server/models";
|
||||
import { buildUser, buildAdmin, buildCollection } from "@server/test/factories";
|
||||
import userDemoter from "./userDemoter";
|
||||
|
||||
@@ -11,7 +11,7 @@ describe("userDemoter", () => {
|
||||
const user = await buildUser({ teamId: admin.teamId });
|
||||
const collection = await buildCollection({ teamId: admin.teamId });
|
||||
|
||||
const membership = await CollectionUser.create({
|
||||
const membership = await UserPermission.create({
|
||||
createdById: admin.id,
|
||||
userId: user.id,
|
||||
collectionId: collection.id,
|
||||
|
||||
Reference in New Issue
Block a user