blob: f4e54eae12b20a7a5800e2a0d67245455ce96e3c (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
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;
}
|