Files
test/prisma/migrations/20251108181537_add_better_auth_models/migration.sql
T
daniel 04b7c41abf feat: add class-transformer dependency for better data transformation
refactor(prisma): update User model to include banned status and ban details

refactor(prisma): modify Account model to include new authentication fields

refactor(prisma): enhance Session model with impersonation tracking

refactor(prisma): adjust Verification model to include value field

feat(auth): integrate admin plugin and enhance email verification process

refactor(category): enforce ownership checks in category service methods

refactor(item): update item service to validate category ownership

feat(item): add ability to fetch items by category

refactor(restaurant): implement ownership checks and admin routes in restaurant controller

fix(user): restrict user access to admin routes

feat(exception): implement global exception filter for consistent error handling
2025-11-09 21:47:18 +03:00

40 lines
2.1 KiB
SQL

/*
Warnings:
- You are about to drop the column `accessToken` on the `Account` table. All the data in the column will be lost.
- You are about to drop the column `accountId` on the `Account` table. All the data in the column will be lost.
- You are about to drop the column `expiresAt` on the `Account` table. All the data in the column will be lost.
- You are about to drop the column `password` on the `Account` table. All the data in the column will be lost.
- You are about to drop the column `providerId` on the `Account` table. All the data in the column will be lost.
- You are about to drop the column `refreshToken` on the `Account` table. All the data in the column will be lost.
- A unique constraint covering the columns `[token]` on the table `Verification` will be added. If there are existing duplicate values, this will fail.
- Added the required column `providerAccountId` to the `Account` table without a default value. This is not possible if the table is not empty.
- Added the required column `type` to the `Account` table without a default value. This is not possible if the table is not empty.
- Made the column `provider` on table `Account` required. This step will fail if there are existing NULL values in that column.
- Added the required column `value` to the `Verification` table without a default value. This is not possible if the table is not empty.
*/
-- AlterTable
ALTER TABLE "Account" DROP COLUMN "accessToken",
DROP COLUMN "accountId",
DROP COLUMN "expiresAt",
DROP COLUMN "password",
DROP COLUMN "providerId",
DROP COLUMN "refreshToken",
ADD COLUMN "access_token" TEXT,
ADD COLUMN "expires_at" INTEGER,
ADD COLUMN "id_token" TEXT,
ADD COLUMN "providerAccountId" TEXT NOT NULL,
ADD COLUMN "refresh_token" TEXT,
ADD COLUMN "scope" TEXT,
ADD COLUMN "session_state" TEXT,
ADD COLUMN "token_type" TEXT,
ADD COLUMN "type" TEXT NOT NULL,
ALTER COLUMN "provider" SET NOT NULL;
-- AlterTable
ALTER TABLE "Verification" ADD COLUMN "value" TEXT NOT NULL;
-- CreateIndex
CREATE UNIQUE INDEX "Verification_token_key" ON "Verification"("token");