- Replace Bun with pnpm 9 + Turborepo + tsx; apps/api renamed to apps/backend - Split backend into http/, modules/, lib/ layers mirroring tai-specguard - Add use-case + Result pattern, Problem Details RFC 7807, basePath /api/v1 - Mount Better Auth at /api/v1/auth, keep session-auth whitelist - Split Prisma schema into prisma/models/*, generate into generated/ - Rework packages/shared into lib/ + schemas/ with pagination DTOs - Implement health, groups, students, payments, waitlist modules - Add vitest suite with prisma mocks (21 tests), biome lint - Point web client to /api/v1/auth and /api/v1/groups/from-organization
23 lines
982 B
SQL
23 lines
982 B
SQL
/*
|
|
Warnings:
|
|
|
|
- You are about to drop the column `providerAccountId` on the `accounts` table. All the data in the column will be lost.
|
|
- A unique constraint covering the columns `[issuer,accountId]` on the table `accounts` will be added. If there are existing duplicate values, this will fail.
|
|
- Added the required column `accountId` to the `accounts` table without a default value. This is not possible if the table is not empty.
|
|
- Added the required column `issuer` to the `accounts` table without a default value. This is not possible if the table is not empty.
|
|
|
|
*/
|
|
-- DropIndex
|
|
DROP INDEX "accounts_providerId_providerAccountId_key";
|
|
|
|
-- AlterTable
|
|
ALTER TABLE "accounts" DROP COLUMN "providerAccountId",
|
|
ADD COLUMN "accountId" TEXT NOT NULL,
|
|
ADD COLUMN "issuer" TEXT NOT NULL;
|
|
|
|
-- CreateIndex
|
|
CREATE INDEX "accounts_userId_idx" ON "accounts"("userId");
|
|
|
|
-- CreateIndex
|
|
CREATE UNIQUE INDEX "accounts_issuer_accountId_key" ON "accounts"("issuer", "accountId");
|