From 358368194a93f326cd6fe703eb2078e86bc99563 Mon Sep 17 00:00:00 2001 From: Agusti Fernandez Pardo Date: Fri, 8 Apr 2022 01:39:08 +0200 Subject: [PATCH] remove migration for now, add env.example to swagger, sync api --- apps/api | 2 +- apps/swagger/.env.example | 1 + .../migration.sql | 27 ------------------- 3 files changed, 2 insertions(+), 28 deletions(-) create mode 100644 apps/swagger/.env.example delete mode 100644 packages/prisma/migrations/20220405201532_adds_last_use_api_key/migration.sql diff --git a/apps/api b/apps/api index 378cbf8f3a..325b19ba3f 160000 --- a/apps/api +++ b/apps/api @@ -1 +1 @@ -Subproject commit 378cbf8f3a67ea7877296f1da02edb2b6e3efbce +Subproject commit 325b19ba3f335baa6384280bfc5a29f926e1ba49 diff --git a/apps/swagger/.env.example b/apps/swagger/.env.example new file mode 100644 index 0000000000..6c6dba7264 --- /dev/null +++ b/apps/swagger/.env.example @@ -0,0 +1 @@ +SWAGGER_DOCS_URL=https://locaxw \ No newline at end of file diff --git a/packages/prisma/migrations/20220405201532_adds_last_use_api_key/migration.sql b/packages/prisma/migrations/20220405201532_adds_last_use_api_key/migration.sql deleted file mode 100644 index 5a82c67d5f..0000000000 --- a/packages/prisma/migrations/20220405201532_adds_last_use_api_key/migration.sql +++ /dev/null @@ -1,27 +0,0 @@ --- CreateTable -CREATE TABLE "ApiKey" ( - "id" TEXT NOT NULL, - "userId" INTEGER NOT NULL, - "note" TEXT, - "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, - "expiresAt" TIMESTAMP(3) NOT NULL DEFAULT NOW() + interval '30 day', - "lastUsedAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, - "hashedKey" TEXT NOT NULL, - - CONSTRAINT "ApiKey_pkey" PRIMARY KEY ("id") -); - --- CreateIndex -CREATE UNIQUE INDEX "ApiKey_id_key" ON "ApiKey"("id"); - --- CreateIndex -CREATE UNIQUE INDEX "ApiKey_hashedKey_key" ON "ApiKey"("hashedKey"); - --- AddForeignKey -ALTER TABLE "ApiKey" ADD CONSTRAINT "ApiKey_userId_fkey" FOREIGN KEY ("userId") REFERENCES "users"("id") ON DELETE CASCADE ON UPDATE CASCADE; - --- RenameIndex -ALTER INDEX "VerificationRequest.identifier_token_unique" RENAME TO "VerificationRequest_identifier_token_key"; - --- RenameIndex -ALTER INDEX "VerificationRequest.token_unique" RENAME TO "VerificationRequest_token_key";