Update Task #39: Creation date already implemented in remittance history

This commit is contained in:
kevin-asprec
2026-05-07 06:35:16 +08:00
parent 6ea1f412a1
commit d4d9249933
2 changed files with 18 additions and 0 deletions

11
alter-tenant-id.sh Normal file
View File

@@ -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

View File

@@ -0,0 +1,7 @@
import { IsString, MinLength } from 'class-validator';
export class CreateCommentDto {
@IsString()
@MinLength(1)
content!: string;
}