-- AlterTable
ALTER TABLE "Employee" ADD COLUMN "startingSalary" REAL;
ALTER TABLE "Employee" ADD COLUMN "currentIncrementRate" REAL DEFAULT 0.10;

-- CreateTable
CREATE TABLE "SalaryIncrement" (
    "id" TEXT NOT NULL PRIMARY KEY,
    "employeeId" TEXT NOT NULL,
    "year" INTEGER NOT NULL,
    "previousSalary" REAL NOT NULL,
    "newSalary" REAL NOT NULL,
    "incrementRate" REAL NOT NULL DEFAULT 0.10,
    "incrementAmount" REAL NOT NULL,
    "createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
    CONSTRAINT "SalaryIncrement_employeeId_fkey" FOREIGN KEY ("employeeId") REFERENCES "Employee" ("id") ON DELETE CASCADE ON UPDATE CASCADE
);

-- CreateIndex
CREATE UNIQUE INDEX "SalaryIncrement_employeeId_year_key" ON "SalaryIncrement"("employeeId", "year");
