column type change for postgres

This commit is contained in:
Julian Krauser 2025-03-24 09:37:13 +01:00
parent 5018e6ac08
commit f7faf23269

View file

@ -1,9 +1,10 @@
import { Column, CreateDateColumn, Entity, ManyToOne, OneToMany, PrimaryColumn } from "typeorm";
import { Column, ColumnType, CreateDateColumn, Entity, ManyToOne, OneToMany, PrimaryColumn } from "typeorm";
import { force } from "../configuration/force";
import { mission_presence } from "./mission_presence";
import { mission_vehicle } from "./mission_vehicle";
import { mission_equipment } from "./mission_equipment";
import { mission_contact } from "./mission_contact";
import { getTypeByORM } from "../../migrations/ormHelper";
@Entity()
export class mission {
@ -19,10 +20,10 @@ export class mission {
@Column({ type: "varchar", length: 36, nullable: true })
secretaryId?: string | null;
@Column({ type: "datetime", nullable: true, default: null })
@Column({ type: getTypeByORM("datetime").type as ColumnType, nullable: true, default: null })
mission_start?: Date | null;
@Column({ type: "datetime", nullable: true, default: null })
@Column({ type: getTypeByORM("datetime").type as ColumnType, nullable: true, default: null })
mission_end?: Date | null;
@Column({ type: "varchar", length: 255, default: "" })