-- CreateTable
CREATE TABLE "User" (
    "id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
    "email" TEXT NOT NULL,
    "name" TEXT,
    "username" TEXT,
    "mobile" TEXT,
    "password" TEXT,
    "approved" BOOLEAN NOT NULL DEFAULT false,
    "role" TEXT NOT NULL DEFAULT 'default'
);

-- CreateTable
CREATE TABLE "Stock" (
    "id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
    "stockName" TEXT,
    "symbol" TEXT,
    "links" TEXT,
    "change" TEXT,
    "price" TEXT,
    "volume" TEXT,
    "filterName" TEXT,
    "filterType" TEXT,
    "filterCategory" TEXT,
    "repeat" INTEGER NOT NULL DEFAULT 0,
    "timestamp" DATETIME NOT NULL
);

-- CreateIndex
CREATE UNIQUE INDEX "User_email_key" ON "User"("email");

-- CreateIndex
CREATE UNIQUE INDEX "User_mobile_key" ON "User"("mobile");
