diff options
author | Madeline <46743919+MaddyUnderStars@users.noreply.github.com> | 2023-02-03 22:39:10 +1100 |
---|---|---|
committer | Madeline <46743919+MaddyUnderStars@users.noreply.github.com> | 2023-02-03 22:39:10 +1100 |
commit | 6d8e6eca9deb59fd723a4e9f56234175755392a3 (patch) | |
tree | d864c05d24b95574a9b98d3845df0d9f15cf6dc9 /src/util/entities | |
parent | Merge branch 'master' of github.com:fosscord/fosscord-server (diff) | |
download | server-6d8e6eca9deb59fd723a4e9f56234175755392a3.tar.xz |
On db sync/first run, add all the current migrations to migrations table to prevent running them on restarts
Diffstat (limited to 'src/util/entities')
-rw-r--r-- | src/util/entities/Migration.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/util/entities/Migration.ts b/src/util/entities/Migration.ts index e8351650..57097d8c 100644 --- a/src/util/entities/Migration.ts +++ b/src/util/entities/Migration.ts @@ -21,8 +21,8 @@ import { Entity, ObjectIdColumn, PrimaryGeneratedColumn, + BaseEntity, } from "typeorm"; -import { BaseClassWithoutId } from "./BaseClass"; export const PrimaryIdAutoGenerated = process.env.DATABASE?.startsWith( "mongodb", @@ -31,7 +31,7 @@ export const PrimaryIdAutoGenerated = process.env.DATABASE?.startsWith( : PrimaryGeneratedColumn; @Entity("migrations") -export class Migration extends BaseClassWithoutId { +export class Migration extends BaseEntity { @PrimaryIdAutoGenerated() id: number; |