blob: 7393496f389781c1bcfb4233c50d44ba1667342f (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
import { Column, Entity, ObjectIdColumn, PrimaryGeneratedColumn } from "typeorm";
import { BaseClassWithoutId } from ".";
export const PrimaryIdAutoGenerated = process.env.DATABASE?.startsWith("mongodb")
? ObjectIdColumn
: PrimaryGeneratedColumn;
@Entity("migrations")
export class Migration extends BaseClassWithoutId {
@PrimaryIdAutoGenerated()
id: number;
@Column({ type: 'bigint' })
timestamp: number;
@Column()
name: string;
}
|