-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add joined at date for searched user * Update user search query to respect respect http standards * Enable cors * minor fixes * Correct relations * Check if users are connected when doing an user search * fix db structure * fix namings
- Loading branch information
1 parent
4f6b81a
commit 2b4edfb
Showing
8 changed files
with
119 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
src/prisma/migrations/20240509195830_fix_namings/migration.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/* | ||
Warnings: | ||
- You are about to drop the column `ratedUserId` on the `Rating` table. All the data in the column will be lost. | ||
- You are about to drop the column `raterUserId` on the `Rating` table. All the data in the column will be lost. | ||
- Added the required column `postedToId` to the `Rating` table without a default value. This is not possible if the table is not empty. | ||
*/ | ||
-- AlterTable | ||
ALTER TABLE "User" ADD COLUMN "joinedAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP; | ||
|
||
|
||
-- DropForeignKey | ||
ALTER TABLE "Rating" DROP CONSTRAINT "Rating_ratedUserId_fkey"; | ||
|
||
-- DropForeignKey | ||
ALTER TABLE "Rating" DROP CONSTRAINT "Rating_raterUserId_fkey"; | ||
|
||
-- AlterTable | ||
ALTER TABLE "Rating" DROP COLUMN "ratedUserId", | ||
DROP COLUMN "raterUserId", | ||
ADD COLUMN "postedById" TEXT, | ||
ADD COLUMN "postedToId" TEXT NOT NULL; | ||
|
||
-- AddForeignKey | ||
ALTER TABLE "Rating" ADD CONSTRAINT "Rating_postedToId_fkey" FOREIGN KEY ("postedToId") REFERENCES "User"("id") ON DELETE CASCADE ON UPDATE CASCADE; | ||
|
||
-- AddForeignKey | ||
ALTER TABLE "Rating" ADD CONSTRAINT "Rating_postedById_fkey" FOREIGN KEY ("postedById") REFERENCES "User"("id") ON DELETE SET NULL ON UPDATE CASCADE; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.