diff --git a/prisma/migrations/20260706112752_removed_password/migration.sql b/prisma/migrations/20260706112752_removed_password/migration.sql deleted file mode 100644 index eab9ba90..00000000 --- a/prisma/migrations/20260706112752_removed_password/migration.sql +++ /dev/null @@ -1,10 +0,0 @@ -/* - Warnings: - - - You are about to drop the column `emailVerified` on the `User` table. All the data in the column will be lost. - - You are about to drop the column `password` on the `User` table. All the data in the column will be lost. - -*/ --- AlterTable -ALTER TABLE "User" DROP COLUMN "emailVerified", -DROP COLUMN "password"; diff --git a/prisma/schema.prisma b/prisma/schema.prisma index 0baa3ac0..5f0bbdfe 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -38,20 +38,22 @@ enum PublicationType { } enum PublicationEventType { - CREATE // The Genesis event of the publication - UPDATE // Every other event + CREATE // The Genesis event of the publication + UPDATE // Every other event } model User { - id String @id @default(uuid()) @db.Uuid + id String @id @default(uuid()) @db.Uuid firstName String lastName String - username String @unique @default(dbgenerated("gen_random_uuid()")) - email String @default("noemail@abv.bg") - reputation Int @default(0) - aboutMe String @default("") - platformId String @default("") - institutionId String @default("") + username String @unique @default(dbgenerated("gen_random_uuid()")) + email String @default("noemail@abv.bg") + emailVerified DateTime? // TODO: REMOVE THIS + reputation Int @default(0) + password String? // hashed password // TODO: REMOVE THIS + aboutMe String @default("") + platformId String @default("") + institutionId String @default("") saved Publication[] @relation("saved") posts Publication[] @@ -69,8 +71,8 @@ model User { replies Reply[] isAdmin Boolean @default(false) - profilePic File? @relation("ProfilePic") - courses Course[] @relation("CourseInstructors") + profilePic File? @relation("ProfilePic") + courses Course[] @relation("CourseInstructors") publicationHistory PublicationHistory[] } @@ -132,8 +134,8 @@ model Publication { } model PublicationHistory { - id String @id @default(uuid()) - createdAt DateTime @default(now()) + id String @id @default(uuid()) + createdAt DateTime @default(now()) action PublicationEventType // Optional user explanation on the change diff --git a/src/routes/[user]/+page.svelte b/src/routes/[user]/+page.svelte index af23e82c..a43117bb 100644 --- a/src/routes/[user]/+page.svelte +++ b/src/routes/[user]/+page.svelte @@ -126,14 +126,16 @@
So empty... There are no publications here
{:else}