chore: revverted ts commit

This commit is contained in:
dr-carrot
2024-08-18 20:32:54 -04:00
parent bd7339a105
commit 3b12c98242
2 changed files with 4 additions and 4 deletions

View File

@@ -9,7 +9,6 @@ import type { DownloadingItem } from '@server/lib/downloadtracker';
import downloadTracker from '@server/lib/downloadtracker';
import { getSettings } from '@server/lib/settings';
import logger from '@server/logger';
import { DbAwareColumn } from '@server/utils/DbColumnHelper';
import { getHostname } from '@server/utils/getHostname';
import {
AfterLoad,
@@ -123,10 +122,10 @@ class Media {
@UpdateDateColumn()
public updatedAt: Date;
@DbAwareColumn({ type: 'datetime', default: () => 'CURRENT_TIMESTAMP' })
@Column({ type: 'timestamp without time zone', default: () => 'now()' })
public lastSeasonChange: Date;
@DbAwareColumn({ type: 'datetime', nullable: true })
@Column({ type: 'timestamp without time zone', default: () => 'now()' })
public mediaAddedAt: Date;
@Column({ nullable: true, type: 'int' })

View File

@@ -1,8 +1,9 @@
import { isPgsql } from '@server/datasource';
import type { ColumnOptions, ColumnType } from 'typeorm';
import { Column } from 'typeorm';
// TODO cleanup this file
const pgTypeMapping: { [key: string]: ColumnType } = {
datetime: 'timestamp with time zone',
datetime: 'timestamp without time zone',
};
export function resolveDbType(pgType: ColumnType): ColumnType {