-- AlterTable: add missing columns to users
ALTER TABLE "users" ADD COLUMN IF NOT EXISTS "firstName" TEXT;
ALTER TABLE "users" ADD COLUMN IF NOT EXISTS "lastName" TEXT;
ALTER TABLE "users" ADD COLUMN IF NOT EXISTS "azureId" TEXT;

-- CreateIndex: unique constraint for azureId
CREATE UNIQUE INDEX IF NOT EXISTS "users_azureId_key" ON "users"("azureId");

-- AlterTable: add missing columns to user_stats
ALTER TABLE "user_stats" ADD COLUMN IF NOT EXISTS "totalHoursLogged" DECIMAL(10,2) NOT NULL DEFAULT 0;
ALTER TABLE "user_stats" ADD COLUMN IF NOT EXISTS "totalProjectsParticipated" INTEGER NOT NULL DEFAULT 0;
