Open-Source API Development Ecosystem • https://hoppscotch.io • Offline, On-Prem & Cloud • Web, Desktop & CLI • Open-Source Alternative to Postman, Insomnia
TypeScript apiapi-clientapi-restapi-testingdeveloper-toolsgraphqlhttphttp-clientpwarestrest-apispatestingtesting-toolstoolsvuevuejswebsocket
chore: changed the schema of database to only store timestamp without timezone info
Balu Babu364381f017fd
diff --git a/packages/hoppscotch-backend/prisma/migrations/20230118233921_timestamp_fix/migration.sql b/packages/hoppscotch-backend/prisma/migrations/20230118233921_timestamp_fix/migration.sqlnew file mode 100644index 000000000..e30bff27c--- /dev/null+++ b/packages/hoppscotch-backend/prisma/migrations/20230118233921_timestamp_fix/migration.sql@@ -0,0 +1,8 @@+-- AlterTable+ALTER TABLE "Account" ALTER COLUMN "loggedIn" SET DATA TYPE TIMESTAMP(3);++-- AlterTable+ALTER TABLE "PasswordlessVerification" ALTER COLUMN "expiresOn" SET DATA TYPE TIMESTAMP(3);++-- AlterTable+ALTER TABLE "User" ALTER COLUMN "createdOn" SET DATA TYPE TIMESTAMP(3);diff --git a/packages/hoppscotch-backend/prisma/schema.prisma b/packages/hoppscotch-backend/prisma/schema.prismaindex cc22f509e..ea4c57887 100644--- a/packages/hoppscotch-backend/prisma/schema.prisma+++ b/packages/hoppscotch-backend/prisma/schema.prisma@@ -86,7 +86,7 @@ model User {isAdmin Boolean @default(false)refreshToken String?accounts Account[]- createdOn DateTime @default(now()) @db.Timestamptz(3)+ createdOn DateTime @default(now()) @db.Timestamp(3)PasswordlessVerification PasswordlessVerification[]}@@ -98,7 +98,7 @@ model Account {providerRefreshToken String?providerAccessToken String?providerScope String?- loggedIn DateTime @default(now()) @db.Timestamptz(3)+ loggedIn DateTime @default(now()) @db.Timestamp(3)user User @relation(fields: [userId], references: [id], onDelete: Cascade)@@ -110,7 +110,7 @@ model PasswordlessVerification {token String @unique @default(cuid())userUid Stringuser User @relation(fields: [userUid], references: [id], onDelete: Cascade)- expiresOn DateTime @db.Timestamptz(3)+ expiresOn DateTime @db.Timestamp(3)@@unique(fields: [deviceIdentifier, token], name: "passwordless_deviceIdentifier_tokens")}diff --git a/packages/hoppscotch-backend/src/user/user.resolver.ts b/packages/hoppscotch-backend/src/user/user.resolver.tsindex 5cca6494a..ae1837b0b 100644--- a/packages/hoppscotch-backend/src/user/user.resolver.ts+++ b/packages/hoppscotch-backend/src/user/user.resolver.ts@@ -6,8 +6,6 @@ import { GqlUser } from '../decorators/gql-user.decorator';@Resolver(() => User)export class UserResolver {- // TODO: remove the eslint-disable line below once dependencies are added to user.service file- // eslint-disable-next-line @typescript-eslint/no-empty-functionconstructor() {}@Query(() => User, {