/*
  Warnings:

  - You are about to drop the `FacebookEvent` table. If the table is not empty, all the data it contains will be lost.
  - You are about to drop the `TikTokEvent` table. If the table is not empty, all the data it contains will be lost.

*/
-- DropTable
DROP TABLE "FacebookEvent";

-- DropTable
DROP TABLE "TikTokEvent";

-- CreateTable
CREATE TABLE "facebook_event" (
    "id" SERIAL NOT NULL,
    "eventName" TEXT,
    "eventTime" TIMESTAMP(3),
    "eventIp" TEXT,
    "eventUserAgent" TEXT,
    "fbClid" TEXT,
    "customId" TEXT,
    "needToSend" BOOLEAN NOT NULL,
    "binomCampaignId" TEXT,
    "value" TEXT,
    "binomOfferId" TEXT,
    "binomClickId" TEXT,

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

-- CreateTable
CREATE TABLE "tiktok_event" (
    "id" SERIAL NOT NULL,
    "eventName" TEXT,
    "eventTime" TIMESTAMP(3),
    "eventIp" TEXT,
    "eventUserAgent" TEXT,
    "ttclid" TEXT,
    "customId" TEXT,
    "needToSend" BOOLEAN NOT NULL,
    "binomCampaignId" TEXT,
    "binomOfferId" TEXT,
    "binomClickId" TEXT,
    "value" TEXT,

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

-- CreateIndex
CREATE UNIQUE INDEX "facebook_event_fbClid_key" ON "facebook_event"("fbClid");

-- CreateIndex
CREATE UNIQUE INDEX "tiktok_event_ttclid_key" ON "tiktok_event"("ttclid");
