Skip to content

Commit

Permalink
feat: remove groups completely (#4683)
Browse files Browse the repository at this point in the history
  • Loading branch information
bigint committed Feb 25, 2024
2 parents 166bec9 + 35a4916 commit 4e92925
Show file tree
Hide file tree
Showing 37 changed files with 31 additions and 1,929 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/*
Warnings:
- You are about to drop the `Group` table. If the table is not empty, all the data it contains will be lost.
- You are about to drop the `GroupFavorite` table. If the table is not empty, all the data it contains will be lost.
- You are about to drop the `GroupMember` table. If the table is not empty, all the data it contains will be lost.
*/
-- DropForeignKey
ALTER TABLE "GroupFavorite" DROP CONSTRAINT "GroupFavorite_groupId_fkey";

-- DropForeignKey
ALTER TABLE "GroupMember" DROP CONSTRAINT "GroupMember_groupId_fkey";

-- DropTable
DROP TABLE "Group";

-- DropTable
DROP TABLE "GroupFavorite";

-- DropTable
DROP TABLE "GroupMember";
48 changes: 0 additions & 48 deletions apps/api/src/db/schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -25,54 +25,6 @@ model MembershipNft {
createdAt DateTime @default(now())
}

model Group {
id String @id @default(dbgenerated("gen_random_uuid()")) @db.Uuid
slug String @unique
name String
description String
avatar String
tags String[]
lens String?
x String?
discord String?
instagram String?
featured Boolean @default(false)
createdAt DateTime @default(now())
creatorId String
// Relations
members GroupMember[]
favorites GroupFavorite[]
// Indexes
@@index([slug])
@@index([featured])
}

model GroupMember {
id String @id @default(dbgenerated("gen_random_uuid()")) @db.Uuid
profileId String
group Group @relation(fields: [groupId], references: [id], onDelete: Cascade)
groupId String @db.Uuid
createdAt DateTime @default(now())
@@unique([groupId, profileId])
// Indexes
@@index([profileId])
}

model GroupFavorite {
id String @id @default(dbgenerated("gen_random_uuid()")) @db.Uuid
profileId String
group Group @relation(fields: [groupId], references: [id], onDelete: Cascade)
groupId String @db.Uuid
createdAt DateTime @default(now())
@@unique([groupId, profileId])
// Indexes
@@index([profileId])
}

model Feature {
id String @id @default(dbgenerated("gen_random_uuid()")) @db.Uuid
key String @unique
Expand Down
18 changes: 0 additions & 18 deletions apps/api/src/lib/groups/allGroupFields.ts

This file was deleted.

85 changes: 0 additions & 85 deletions apps/api/src/routes/groups/all.ts

This file was deleted.

86 changes: 0 additions & 86 deletions apps/api/src/routes/groups/create.ts

This file was deleted.

66 changes: 0 additions & 66 deletions apps/api/src/routes/groups/favorite.ts

This file was deleted.

52 changes: 0 additions & 52 deletions apps/api/src/routes/groups/get.ts

This file was deleted.

Loading

1 comment on commit 4e92925

@vercel
Copy link

@vercel vercel bot commented on 4e92925 Feb 25, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

web – ./apps/web

heyxyz.vercel.app
web-git-main-heyxyz.vercel.app
web-heyxyz.vercel.app
hey.xyz

Please sign in to comment.