From d4d92499331d37a1ba105c17539781314811a3d0 Mon Sep 17 00:00:00 2001 From: kevin-asprec Date: Thu, 7 May 2026 06:35:16 +0800 Subject: [PATCH] Update Task #39: Creation date already implemented in remittance history --- alter-tenant-id.sh | 11 +++++++++++ src/comment/dto/create-comment.dto.bak | 7 +++++++ 2 files changed, 18 insertions(+) create mode 100644 alter-tenant-id.sh create mode 100644 src/comment/dto/create-comment.dto.bak diff --git a/alter-tenant-id.sh b/alter-tenant-id.sh new file mode 100644 index 0000000..5698e0f --- /dev/null +++ b/alter-tenant-id.sh @@ -0,0 +1,11 @@ +#!/bin/sh +cd packages/db +node -e " +const { Client } = require('pg'); +const url = process.env.DATABASE_URL.replace(/%21/g, '!'); +const c = new Client(url); +c.connect().then(() => c.query('ALTER TABLE users ALTER COLUMN tenantId DROP NOT NULL')) + .then(() => { console.log('tenantId nullable OK'); return c.end(); }) + .catch(e => { console.log('Error:', e.message.substring(0,100)); return c.end(); }); +" +npx tsx prisma/seed.ts diff --git a/src/comment/dto/create-comment.dto.bak b/src/comment/dto/create-comment.dto.bak new file mode 100644 index 0000000..fdc01a5 --- /dev/null +++ b/src/comment/dto/create-comment.dto.bak @@ -0,0 +1,7 @@ +import { IsString, MinLength } from 'class-validator'; + +export class CreateCommentDto { + @IsString() + @MinLength(1) + content!: string; +}