-- CreateTable
CREATE TABLE IF NOT EXISTS "BoardInvoicePending" (
    "paymentHash" TEXT NOT NULL PRIMARY KEY,
    "content" TEXT NOT NULL,
    "guestName" TEXT,
    "pubkey" TEXT,
    "profilePic" TEXT,
    "createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP
);

-- CreateTable
CREATE TABLE IF NOT EXISTS "BoardMessage" (
    "id" TEXT NOT NULL PRIMARY KEY,
    "paymentHash" TEXT NOT NULL,
    "content" TEXT NOT NULL,
    "authorName" TEXT NOT NULL,
    "pubkey" TEXT,
    "profilePic" TEXT,
    "satsPaid" INTEGER NOT NULL,
    "status" TEXT NOT NULL DEFAULT 'active',
    "likeCount" INTEGER NOT NULL DEFAULT 0,
    "createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP
);

-- CreateIndex
CREATE UNIQUE INDEX IF NOT EXISTS "BoardMessage_paymentHash_key" ON "BoardMessage"("paymentHash");

-- DropIndex (cleanup from organizer migration)
DROP INDEX IF EXISTS "Meetup_organizerId_idx";
