-- AlterTable
ALTER TABLE "authorization_roles" ADD COLUMN     "benefit_valid_until" TIMESTAMP(3),
ADD COLUMN     "last_assessment_month" TEXT,
ADD COLUMN     "monthly_trees_added" INTEGER NOT NULL DEFAULT 0,
ALTER COLUMN "user_id" SET DATA TYPE TEXT,
ALTER COLUMN "authorized_by" SET DATA TYPE TEXT,
ALTER COLUMN "revoked_by" SET DATA TYPE TEXT;

-- AlterTable
ALTER TABLE "monthly_assessments" ALTER COLUMN "user_id" SET DATA TYPE TEXT,
ALTER COLUMN "bypassed_by" SET DATA TYPE TEXT;

-- AlterTable
ALTER TABLE "monthly_bypasses" ALTER COLUMN "user_id" SET DATA TYPE TEXT,
ALTER COLUMN "granted_by" SET DATA TYPE TEXT,
ALTER COLUMN "approver1_id" SET DATA TYPE TEXT,
ALTER COLUMN "approver2_id" SET DATA TYPE TEXT,
ALTER COLUMN "approver3_id" SET DATA TYPE TEXT;

-- AlterTable
ALTER TABLE "stickman_rankings" ALTER COLUMN "user_id" SET DATA TYPE TEXT;

-- RenameIndex
ALTER INDEX "idx_authorization_roles_account_sequence" RENAME TO "authorization_roles_account_sequence_idx";

-- RenameIndex
ALTER INDEX "idx_monthly_assessments_account_sequence_month" RENAME TO "monthly_assessments_account_sequence_assessment_month_idx";

-- RenameIndex
ALTER INDEX "idx_monthly_bypasses_account_sequence_month" RENAME TO "monthly_bypasses_account_sequence_bypass_month_idx";

-- RenameIndex
ALTER INDEX "idx_stickman_rankings_account_sequence_month" RENAME TO "stickman_rankings_account_sequence_current_month_idx";
