feat: implement friendship system with requests and management features
All checks were successful
Build Docker Image / build (push) Successful in 1m15s
All checks were successful
Build Docker Image / build (push) Successful in 1m15s
- Added a new friendship table schema to manage friend requests and relationships. - Updated profile page to include tabs for managing friends, incoming requests, and outgoing requests. - Implemented functionality to send, accept, decline, cancel, and remove friend requests. - Enhanced user experience with feedback messages for friend request actions.
This commit is contained in:
12
drizzle/0008_skinny_warpath.sql
Normal file
12
drizzle/0008_skinny_warpath.sql
Normal file
@@ -0,0 +1,12 @@
|
||||
CREATE TABLE `friendship` (
|
||||
`id` text PRIMARY KEY NOT NULL,
|
||||
`requesterId` text NOT NULL,
|
||||
`addresseeId` text NOT NULL,
|
||||
`status` text DEFAULT 'pending' NOT NULL,
|
||||
`createdAt` integer NOT NULL,
|
||||
`updatedAt` integer NOT NULL,
|
||||
FOREIGN KEY (`requesterId`) REFERENCES `user`(`id`) ON UPDATE no action ON DELETE cascade,
|
||||
FOREIGN KEY (`addresseeId`) REFERENCES `user`(`id`) ON UPDATE no action ON DELETE cascade
|
||||
);
|
||||
--> statement-breakpoint
|
||||
CREATE UNIQUE INDEX `friendship_requesterId_addresseeId_unique` ON `friendship` (`requesterId`,`addresseeId`);
|
||||
Reference in New Issue
Block a user