From a7f431507c0bbdd4ca41176840087fd9ddedb524 Mon Sep 17 00:00:00 2001 From: SiWooJinSeok <59861974+SiWooJinSeok@users.noreply.github.com> Date: Thu, 25 Apr 2024 20:28:07 +0900 Subject: [PATCH] =?UTF-8?q?fix=20:=20migrate=20=EC=A0=9C=EA=B1=B0=20?= =?UTF-8?q?=ED=9B=84=20=EC=8B=A4=ED=96=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- prisma/migrations/20240412104045_/migration.sql | 9 --------- prisma/migrations/20240415035637_/migration.sql | 8 -------- .../migration.sql | 15 ++++++++------- src/app.controller.ts | 2 +- 4 files changed, 9 insertions(+), 25 deletions(-) delete mode 100644 prisma/migrations/20240412104045_/migration.sql delete mode 100644 prisma/migrations/20240415035637_/migration.sql rename prisma/migrations/{20240422091513_ => 20240425112717_}/migration.sql (78%) diff --git a/prisma/migrations/20240412104045_/migration.sql b/prisma/migrations/20240412104045_/migration.sql deleted file mode 100644 index e73b95a..0000000 --- a/prisma/migrations/20240412104045_/migration.sql +++ /dev/null @@ -1,9 +0,0 @@ --- CreateTable -CREATE TABLE `User` ( - `id` INTEGER NOT NULL AUTO_INCREMENT, - `email` VARCHAR(191) NOT NULL, - `nickname` VARCHAR(191) NOT NULL, - `state` VARCHAR(191) NOT NULL, - - PRIMARY KEY (`id`) -) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; diff --git a/prisma/migrations/20240415035637_/migration.sql b/prisma/migrations/20240415035637_/migration.sql deleted file mode 100644 index 81eb2fd..0000000 --- a/prisma/migrations/20240415035637_/migration.sql +++ /dev/null @@ -1,8 +0,0 @@ -/* - Warnings: - - - A unique constraint covering the columns `[email]` on the table `User` will be added. If there are existing duplicate values, this will fail. - -*/ --- CreateIndex -CREATE UNIQUE INDEX `User_email_key` ON `User`(`email`); diff --git a/prisma/migrations/20240422091513_/migration.sql b/prisma/migrations/20240425112717_/migration.sql similarity index 78% rename from prisma/migrations/20240422091513_/migration.sql rename to prisma/migrations/20240425112717_/migration.sql index 966af29..34688aa 100644 --- a/prisma/migrations/20240422091513_/migration.sql +++ b/prisma/migrations/20240425112717_/migration.sql @@ -1,11 +1,12 @@ -/* - Warnings: - - - You are about to drop the column `state` on the `user` table. All the data in the column will be lost. +-- CreateTable +CREATE TABLE `User` ( + `id` INTEGER NOT NULL AUTO_INCREMENT, + `email` VARCHAR(191) NOT NULL, + `nickname` VARCHAR(191) NOT NULL, -*/ --- AlterTable -ALTER TABLE `user` DROP COLUMN `state`; + UNIQUE INDEX `User_email_key`(`email`), + PRIMARY KEY (`id`) +) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -- CreateTable CREATE TABLE `FriendList` ( diff --git a/src/app.controller.ts b/src/app.controller.ts index cce879e..cb823a5 100644 --- a/src/app.controller.ts +++ b/src/app.controller.ts @@ -1,7 +1,7 @@ import { Controller, Get } from '@nestjs/common'; import { AppService } from './app.service'; -@Controller() +@Controller('/user') export class AppController { constructor(private readonly appService: AppService) {}