Skip to content

Commit

Permalink
Added default value for startingOnField in phaseHistory entity
Browse files Browse the repository at this point in the history
  • Loading branch information
Benjyhy committed Nov 20, 2024
1 parent e162ae0 commit 050fb9f
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions server/entities/phaseHistory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,17 @@ export class PhaseHistory {
})
phase: VillagePhase;

@CreateDateColumn()
@CreateDateColumn({
type: 'datetime',
precision: 6,
default: () => 'CURRENT_TIMESTAMP(6)',
})
public startingOn: Date;

@DeleteDateColumn()
@DeleteDateColumn({
type: 'datetime',
precision: 6,
nullable: true,
})
public endingOn: Date;
}

0 comments on commit 050fb9f

Please sign in to comment.