From 34f098f76f8bc6feb4e95611782ee3a064b534b0 Mon Sep 17 00:00:00 2001 From: Douglas Barone Date: Mon, 30 Oct 2023 12:38:56 -0400 Subject: [PATCH] Use Datetime --- .../migration.sql | 21 +++++++++++++++++++ server/prisma/schema.prisma | 10 ++++----- 2 files changed, 26 insertions(+), 5 deletions(-) create mode 100644 server/prisma/migrations/20231030143815_use_date_time/migration.sql diff --git a/server/prisma/migrations/20231030143815_use_date_time/migration.sql b/server/prisma/migrations/20231030143815_use_date_time/migration.sql new file mode 100644 index 0000000..28a6131 --- /dev/null +++ b/server/prisma/migrations/20231030143815_use_date_time/migration.sql @@ -0,0 +1,21 @@ +/* + Warnings: + + - The `badPasswordTime` column on the `User` table would be dropped and recreated. This will lead to data loss if there is data in the column. + - The `extensionAttribute7` column on the `User` table would be dropped and recreated. This will lead to data loss if there is data in the column. + - The `lastLogon` column on the `User` table would be dropped and recreated. This will lead to data loss if there is data in the column. + - The `lastLogonTimestamp` column on the `User` table would be dropped and recreated. This will lead to data loss if there is data in the column. + - The `lockoutTime` column on the `User` table would be dropped and recreated. This will lead to data loss if there is data in the column. + +*/ +-- AlterTable +ALTER TABLE "User" DROP COLUMN "badPasswordTime", +ADD COLUMN "badPasswordTime" TIMESTAMP(3), +DROP COLUMN "extensionAttribute7", +ADD COLUMN "extensionAttribute7" TIMESTAMP(3), +DROP COLUMN "lastLogon", +ADD COLUMN "lastLogon" TIMESTAMP(3), +DROP COLUMN "lastLogonTimestamp", +ADD COLUMN "lastLogonTimestamp" TIMESTAMP(3), +DROP COLUMN "lockoutTime", +ADD COLUMN "lockoutTime" TIMESTAMP(3); diff --git a/server/prisma/schema.prisma b/server/prisma/schema.prisma index 078f8ed..bf8eedb 100644 --- a/server/prisma/schema.prisma +++ b/server/prisma/schema.prisma @@ -29,7 +29,7 @@ model User { createdAt DateTime @default(now()) updatedAt DateTime @updatedAt accountExpires String? - badPasswordTime String? + badPasswordTime DateTime? badPwdCount String? cn String? department String? @@ -41,14 +41,14 @@ model User { extensionAttribute10 String? extensionAttribute2 String? extensionAttribute6 String? - extensionAttribute7 String? + extensionAttribute7 DateTime? givenName String? homeDirectory String? homeDrive String? lastLogoff String? - lastLogon String? - lastLogonTimestamp String? - lockoutTime String? + lastLogon DateTime? + lastLogonTimestamp DateTime? + lockoutTime DateTime? logonCount String? mail String? name String?