-- CreateTable
CREATE TABLE "blocked_ips" (
    "id" BIGSERIAL NOT NULL,
    "ip_address" VARCHAR(50) NOT NULL,
    "reason" VARCHAR(500),
    "attack_count" INTEGER NOT NULL DEFAULT 1,
    "last_attempt" TIMESTAMP(3),
    "is_active" BOOLEAN NOT NULL DEFAULT true,
    "created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
    "blocked_until" TIMESTAMP(3),

    CONSTRAINT "blocked_ips_pkey" PRIMARY KEY ("id")
);

-- CreateIndex
CREATE UNIQUE INDEX "blocked_ips_ip_address_key" ON "blocked_ips"("ip_address");
