blob: 626ec429bbe1c94c21d204ac9523dcc9ef6ce12f (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
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;
}
|