-- CreateTable
CREATE TABLE "controller_sessions" (
    "id" SERIAL NOT NULL,
    "cid" TEXT NOT NULL,
    "name" TEXT NOT NULL,
    "callsign" TEXT NOT NULL,
    "facilityType" TEXT NOT NULL,
    "frequency" TEXT NOT NULL,
    "airport" TEXT NOT NULL,
    "rating" TEXT NOT NULL,
    "last_seen" TIMESTAMP(3) NOT NULL,
    "logon_time" TIMESTAMP(3) NOT NULL,
    "created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,

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

-- CreateIndex
CREATE INDEX "controller_sessions_cid_idx" ON "controller_sessions"("cid");

-- CreateIndex
CREATE INDEX "controller_sessions_last_seen_idx" ON "controller_sessions"("last_seen");
