-- CreateTable
CREATE TABLE "accounts"
(
    "id"                SERIAL       NOT NULL,
    "userId"            INTEGER      NOT NULL,
    "type"              VARCHAR(255) NOT NULL,
    "provider"          VARCHAR(255) NOT NULL,
    "providerAccountId" VARCHAR(255) NOT NULL,
    "refresh_token"     TEXT,
    "access_token"      TEXT,
    "expires_at"        BIGINT,
    "id_token"          TEXT,
    "scope"             TEXT,
    "session_state"     TEXT,
    "token_type"        TEXT,

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

-- CreateTable
CREATE TABLE "sessions"
(
    "id"           SERIAL         NOT NULL,
    "userId"       INTEGER        NOT NULL,
    "expires"      TIMESTAMPTZ(6) NOT NULL,
    "sessionToken" VARCHAR(255)   NOT NULL,

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

-- CreateTable
CREATE TABLE "users"
(
    "id"            SERIAL NOT NULL,
    "name"          VARCHAR(255),
    "email"         VARCHAR(255),
    "emailVerified" TIMESTAMPTZ(6),
    "image"         TEXT,

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

-- CreateTable
CREATE TABLE "verification_token"
(
    "identifier" TEXT           NOT NULL,
    "expires"    TIMESTAMPTZ(6) NOT NULL,
    "token"      TEXT           NOT NULL,

    CONSTRAINT "verification_token_pk" PRIMARY KEY ("identifier", "token")
);

