finalizing team support

This commit is contained in:
daniel31x13
2024-10-29 18:08:47 -04:00
parent b09de5a8af
commit 665019dc59
25 changed files with 511 additions and 201 deletions
@@ -0,0 +1,11 @@
/*
Warnings:
- You are about to drop the column `teamRole` on the `User` table. All the data in the column will be lost.
*/
-- AlterTable
ALTER TABLE "User" DROP COLUMN "teamRole";
-- DropEnum
DROP TYPE "TeamRole";
@@ -0,0 +1,8 @@
/*
Warnings:
- You are about to drop the column `teamId` on the `Collection` table. All the data in the column will be lost.
*/
-- AlterTable
ALTER TABLE "Collection" DROP COLUMN "teamId";
-7
View File
@@ -37,7 +37,6 @@ model User {
locale String @default("en")
parentSubscription Subscription? @relation("ChildUsers", fields: [parentSubscriptionId], references: [id])
parentSubscriptionId Int?
teamRole TeamRole @default(ADMIN)
accounts Account[]
collections Collection[]
tags Tag[]
@@ -77,11 +76,6 @@ model WhitelistedUser {
updatedAt DateTime @default(now()) @updatedAt
}
enum TeamRole {
MEMBER
ADMIN
}
model VerificationToken {
identifier String
token String @unique
@@ -114,7 +108,6 @@ model Collection {
owner User @relation(fields: [ownerId], references: [id])
ownerId Int
members UsersAndCollections[]
teamId Int?
createdBy User @relation("CreatedCollections", fields: [createdById], references: [id])
createdById Int
links Link[]