• [MySQL] 오류해결 : Illegal mix of collations (utf8mb4_general_ci,IMPLICIT) and (utf8mb4_unicode_ci,IMPLICIT) for operation '='

    [MySQL] 오류해결 : Illegal mix of collations (utf8mb4_general_ci,IMPLICIT) and (utf8mb4_unicode_ci,IMPLICIT) for operation '='

    발생 새 테이블을 추가하고 다른 테이블과 조인하려고 하는데 아래와 같은 에러가 발생 Illegal mix of collations (utf8mb4_general_ci,IMPLICIT) and (utf8mb4_unicode_ci,IMPLICIT) for operation '=' 원인 기존 테이블과 새 테이블의 Collate 값이 달라서 발생 해결 ALTER TABLE {테이블명} CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;

  • [NestJS] 간단한 미들웨어를 만들어 IP 차단하기

    [NestJS] 간단한 미들웨어를 만들어 IP 차단하기

    미들웨어 파일 생성 // ./middleware/IpFilterMiddleware.ts import { Injectable, NestMiddleware, UnauthorizedException } from '@nestjs/common'; import { NextFunction, Request, Response } from 'express'; @Injectable() export class IpFilterMiddleware implements NestMiddleware { async use(req: Request, res: Response, next: NextFunction) { const ipAddress = req.headers['cf-connecting-ip']; if (ipAddress == '차단..

  • [Git] Push 되돌리기

    [Git] Push 되돌리기

    1. 아래 명령어를 통해 되돌리고 싶은 시점의 커밋번호 확인 git log --oneline 2. 커밋 시점으로 리셋 git reset --hard {커밋번호} 추가) 아래 명령어로 푸쉬내역까지 되돌릴 수 있음 git push -f origin master