-- CreateTable
CREATE TABLE "MantisNote" (
    "id" SERIAL NOT NULL,
    "mantis_issue_id" INTEGER NOT NULL,
    "content" TEXT NOT NULL,
    "created_by" TEXT NOT NULL,
    "created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
    "updated_at" TIMESTAMP(3) NOT NULL,

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

-- CreateIndex
CREATE INDEX "MantisNote_mantis_issue_id_idx" ON "MantisNote"("mantis_issue_id");

-- CreateIndex
CREATE INDEX "MantisNote_created_by_idx" ON "MantisNote"("created_by");

-- AddForeignKey
ALTER TABLE "MantisNote" ADD CONSTRAINT "MantisNote_mantis_issue_id_fkey" FOREIGN KEY ("mantis_issue_id") REFERENCES "MantisIssue"("id") ON DELETE CASCADE ON UPDATE CASCADE;
