From fb6522cc38452935c41efca873bf57d4c4f14c41 Mon Sep 17 00:00:00 2001 From: Benjamin Ramet Date: Thu, 21 Nov 2024 11:27:02 +0100 Subject: [PATCH] Fix entity --- server/entities/phaseHistory.ts | 5 +---- server/migrations/1731486908522-AddPhaseHistory.ts | 3 --- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/server/entities/phaseHistory.ts b/server/entities/phaseHistory.ts index 6ac23dc4d..7062dfde7 100644 --- a/server/entities/phaseHistory.ts +++ b/server/entities/phaseHistory.ts @@ -4,7 +4,7 @@ import type { VillagePhase } from './village'; import { Village } from './village'; @Entity() -@Index(['village', 'phase'], { unique: true }) +@Index('IDX_PHASE_HISTORY', ['village', 'phase'], { unique: true }) export class PhaseHistory { @PrimaryGeneratedColumn() public id: number; @@ -19,14 +19,11 @@ export class PhaseHistory { @CreateDateColumn({ type: 'datetime', - precision: 6, - default: () => 'CURRENT_TIMESTAMP(6)', }) public startingOn: Date; @DeleteDateColumn({ type: 'datetime', - precision: 6, nullable: true, }) public endingOn: Date; diff --git a/server/migrations/1731486908522-AddPhaseHistory.ts b/server/migrations/1731486908522-AddPhaseHistory.ts index a911dfb94..79b9081dc 100644 --- a/server/migrations/1731486908522-AddPhaseHistory.ts +++ b/server/migrations/1731486908522-AddPhaseHistory.ts @@ -26,13 +26,10 @@ export class AddPhaseHistory1731486908522 implements MigrationInterface { { name: 'startingOn', type: 'datetime', - precision: 6, - default: 'CURRENT_TIMESTAMP(6)', }, { name: 'endingOn', type: 'datetime', - precision: 6, isNullable: true, }, ],