Files
SkyMoney/api/prisma/migrations/20251122234020_add_funding_system/migration.sql

15 lines
579 B
SQL

-- CreateEnum
CREATE TYPE "FundingStrategy" AS ENUM ('tight', 'moderate', 'comfortable');
-- CreateEnum
CREATE TYPE "IncomeFrequency" AS ENUM ('weekly', 'biweekly', 'monthly', 'irregular');
-- AlterTable
ALTER TABLE "FixedPlan" ADD COLUMN "currentFundedCents" BIGINT NOT NULL DEFAULT 0,
ADD COLUMN "lastFundingDate" TIMESTAMP(3);
-- AlterTable
ALTER TABLE "User" ADD COLUMN "fundingStrategy" "FundingStrategy" NOT NULL DEFAULT 'moderate',
ADD COLUMN "incomeFrequency" "IncomeFrequency" NOT NULL DEFAULT 'irregular',
ADD COLUMN "typicalIncomeCents" BIGINT;