New: Hero Page und Navigation
This commit is contained in:
@ -0,0 +1,7 @@
|
||||
-- CreateTable
|
||||
CREATE TABLE "Nachhilfeangebot" (
|
||||
"id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
|
||||
"subject" TEXT NOT NULL,
|
||||
"currentClass" TEXT NOT NULL,
|
||||
"cost" DECIMAL NOT NULL
|
||||
);
|
22
api/db/migrations/20241004122139_created_at/migration.sql
Normal file
22
api/db/migrations/20241004122139_created_at/migration.sql
Normal file
@ -0,0 +1,22 @@
|
||||
/*
|
||||
Warnings:
|
||||
|
||||
- Added the required column `userId` to the `Nachhilfeangebot` table without a default value. This is not possible if the table is not empty.
|
||||
|
||||
*/
|
||||
-- RedefineTables
|
||||
PRAGMA defer_foreign_keys=ON;
|
||||
PRAGMA foreign_keys=OFF;
|
||||
CREATE TABLE "new_Nachhilfeangebot" (
|
||||
"id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
|
||||
"subject" TEXT NOT NULL,
|
||||
"currentClass" TEXT NOT NULL,
|
||||
"cost" DECIMAL NOT NULL,
|
||||
"userId" INTEGER NOT NULL,
|
||||
CONSTRAINT "Nachhilfeangebot_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User" ("id") ON DELETE RESTRICT ON UPDATE CASCADE
|
||||
);
|
||||
INSERT INTO "new_Nachhilfeangebot" ("cost", "currentClass", "id", "subject") SELECT "cost", "currentClass", "id", "subject" FROM "Nachhilfeangebot";
|
||||
DROP TABLE "Nachhilfeangebot";
|
||||
ALTER TABLE "new_Nachhilfeangebot" RENAME TO "Nachhilfeangebot";
|
||||
PRAGMA foreign_keys=ON;
|
||||
PRAGMA defer_foreign_keys=OFF;
|
@ -24,18 +24,19 @@ model UserExample {
|
||||
}
|
||||
|
||||
model User {
|
||||
id Int @id @default(autoincrement())
|
||||
email String @unique
|
||||
id Int @id @default(autoincrement())
|
||||
email String @unique
|
||||
firstName String?
|
||||
lastName String?
|
||||
hashedPassword String?
|
||||
salt String?
|
||||
identites Identity[]
|
||||
resetToken String?
|
||||
resetTokenExpiresAt DateTime?
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
roles String @default("user")
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
roles String @default("user")
|
||||
identites Identity[]
|
||||
Nachhilfeangebot Nachhilfeangebot[]
|
||||
}
|
||||
|
||||
model Identity {
|
||||
@ -61,3 +62,12 @@ model Post {
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
}
|
||||
|
||||
model Nachhilfeangebot {
|
||||
id Int @id @default(autoincrement())
|
||||
subject String
|
||||
currentClass String
|
||||
cost Decimal
|
||||
userId Int
|
||||
user User @relation(fields: [userId], references: [id])
|
||||
}
|
||||
|
Reference in New Issue
Block a user