-- CreateTable
CREATE TABLE "tbl_user_device" (
    "id" BIGSERIAL NOT NULL,
    "user_id" BIGINT,
    "uuid" VARCHAR(256),
    "token" TEXT,
    "token_expiry" TIMESTAMP(0),
    "inserted_at" TIMESTAMP(3) DEFAULT CURRENT_TIMESTAMP,
    "updated_at" TIMESTAMP(3),

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

-- AddForeignKey
ALTER TABLE "tbl_user_device" ADD CONSTRAINT "tbl_user_device_user_id_fkey" FOREIGN KEY ("user_id") REFERENCES "tbl_user"("id") ON DELETE SET NULL ON UPDATE CASCADE;
