-- CreateTable
CREATE TABLE "artikel" (
    "id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
    "name" TEXT NOT NULL,
    "preis" REAL
);

-- CreateTable
CREATE TABLE "kauf" (
    "id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
    "timestamp" INTEGER NOT NULL,
    "preis_ges" REAL
);

-- CreateTable
CREATE TABLE "kauf_artikel" (
    "id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
    "kauf_id" INTEGER NOT NULL,
    "artikel_id" INTEGER NOT NULL,
    "anzahl" INTEGER NOT NULL
);

-- CreateIndex
CREATE UNIQUE INDEX "artikel_name_key" ON "artikel"("name");
