add creation date column to users

This commit is contained in:
Erin 2023-11-12 13:09:20 -05:00
parent bf09096740
commit cd489ed06f

View file

@ -1,4 +1,11 @@
import {BeforeInsert, Column, Entity, OneToMany, PrimaryColumn} from 'typeorm'; import {
BeforeInsert,
Column,
CreateDateColumn,
Entity,
OneToMany,
PrimaryColumn,
} from 'typeorm';
import {ulidMonotonic} from '$lib/server/ulid'; import {ulidMonotonic} from '$lib/server/ulid';
import {AuthMethod} from './AuthMethod'; import {AuthMethod} from './AuthMethod';
@ -8,6 +15,9 @@ export class User {
@PrimaryColumn({type: 'varchar', length: 26}) @PrimaryColumn({type: 'varchar', length: 26})
id = ulidMonotonic(); id = ulidMonotonic();
@CreateDateColumn()
createdAt!: Date;
@Column({type: 'varchar', length: 500, nullable: false}) @Column({type: 'varchar', length: 500, nullable: false})
name!: string; name!: string;