From affcf3d2926a0e9cc52b5383daf296a211190562 Mon Sep 17 00:00:00 2001 From: takonomura Date: Thu, 1 Apr 2021 22:47:01 +0900 Subject: [PATCH] Add column "createdAt" to table "users" --- src/database/model/user.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/database/model/user.ts b/src/database/model/user.ts index 14cc03b..8135d67 100644 --- a/src/database/model/user.ts +++ b/src/database/model/user.ts @@ -1,4 +1,4 @@ -import { Entity, OneToMany, PrimaryColumn } from 'typeorm' +import { Entity, OneToMany, PrimaryColumn, CreateDateColumn } from 'typeorm' import { UserAuthentication } from './userAuthentications' @Entity({ @@ -15,4 +15,7 @@ export class User { cascade: true, }) authentications!: UserAuthentication[] + + @CreateDateColumn({ type: 'timestamp' }) + createdAt!: Date }