mirror of
https://github.com/seerr-team/seerr.git
synced 2026-10-12 02:22:17 +00:00
fix(entity): set the default value of UpdateDateColumn to CURRENT_TIMESTAMP (#2913)
This commit is contained in:
@@ -58,7 +58,10 @@ class DiscoverSlider {
|
||||
@DbAwareColumn({ type: 'datetime', default: () => 'CURRENT_TIMESTAMP' })
|
||||
public createdAt: Date;
|
||||
|
||||
@UpdateDateColumn({ type: resolveDbType('datetime') })
|
||||
@UpdateDateColumn({
|
||||
type: resolveDbType('datetime'),
|
||||
default: () => 'CURRENT_TIMESTAMP',
|
||||
})
|
||||
public updatedAt: Date;
|
||||
|
||||
constructor(init?: Partial<DiscoverSlider>) {
|
||||
|
||||
@@ -64,7 +64,10 @@ class Issue {
|
||||
@DbAwareColumn({ type: 'datetime', default: () => 'CURRENT_TIMESTAMP' })
|
||||
public createdAt: Date;
|
||||
|
||||
@UpdateDateColumn({ type: resolveDbType('datetime') })
|
||||
@UpdateDateColumn({
|
||||
type: resolveDbType('datetime'),
|
||||
default: () => 'CURRENT_TIMESTAMP',
|
||||
})
|
||||
public updatedAt: Date;
|
||||
|
||||
@AfterLoad()
|
||||
|
||||
@@ -34,7 +34,10 @@ class IssueComment {
|
||||
@DbAwareColumn({ type: 'datetime', default: () => 'CURRENT_TIMESTAMP' })
|
||||
public createdAt: Date;
|
||||
|
||||
@UpdateDateColumn({ type: resolveDbType('datetime') })
|
||||
@UpdateDateColumn({
|
||||
type: resolveDbType('datetime'),
|
||||
default: () => 'CURRENT_TIMESTAMP',
|
||||
})
|
||||
public updatedAt: Date;
|
||||
|
||||
constructor(init?: Partial<IssueComment>) {
|
||||
|
||||
@@ -130,7 +130,10 @@ class Media {
|
||||
@DbAwareColumn({ type: 'datetime', default: () => 'CURRENT_TIMESTAMP' })
|
||||
public createdAt: Date;
|
||||
|
||||
@UpdateDateColumn({ type: resolveDbType('datetime') })
|
||||
@UpdateDateColumn({
|
||||
type: resolveDbType('datetime'),
|
||||
default: () => 'CURRENT_TIMESTAMP',
|
||||
})
|
||||
public updatedAt: Date;
|
||||
|
||||
/**
|
||||
|
||||
@@ -543,7 +543,10 @@ export class MediaRequest {
|
||||
@DbAwareColumn({ type: 'datetime', default: () => 'CURRENT_TIMESTAMP' })
|
||||
public createdAt: Date;
|
||||
|
||||
@UpdateDateColumn({ type: resolveDbType('datetime') })
|
||||
@UpdateDateColumn({
|
||||
type: resolveDbType('datetime'),
|
||||
default: () => 'CURRENT_TIMESTAMP',
|
||||
})
|
||||
public updatedAt: Date;
|
||||
|
||||
@Column({ type: 'varchar' })
|
||||
|
||||
@@ -41,7 +41,10 @@ class OverrideRule {
|
||||
@DbAwareColumn({ type: 'datetime', default: () => 'CURRENT_TIMESTAMP' })
|
||||
public createdAt: Date;
|
||||
|
||||
@UpdateDateColumn({ type: resolveDbType('datetime') })
|
||||
@UpdateDateColumn({
|
||||
type: resolveDbType('datetime'),
|
||||
default: () => 'CURRENT_TIMESTAMP',
|
||||
})
|
||||
public updatedAt: Date;
|
||||
|
||||
constructor(init?: Partial<OverrideRule>) {
|
||||
|
||||
@@ -33,7 +33,10 @@ class Season {
|
||||
@DbAwareColumn({ type: 'datetime', default: () => 'CURRENT_TIMESTAMP' })
|
||||
public createdAt: Date;
|
||||
|
||||
@UpdateDateColumn({ type: resolveDbType('datetime') })
|
||||
@UpdateDateColumn({
|
||||
type: resolveDbType('datetime'),
|
||||
default: () => 'CURRENT_TIMESTAMP',
|
||||
})
|
||||
public updatedAt: Date;
|
||||
|
||||
constructor(init?: Partial<Season>) {
|
||||
|
||||
@@ -30,7 +30,10 @@ class SeasonRequest {
|
||||
@DbAwareColumn({ type: 'datetime', default: () => 'CURRENT_TIMESTAMP' })
|
||||
public createdAt: Date;
|
||||
|
||||
@UpdateDateColumn({ type: resolveDbType('datetime') })
|
||||
@UpdateDateColumn({
|
||||
type: resolveDbType('datetime'),
|
||||
default: () => 'CURRENT_TIMESTAMP',
|
||||
})
|
||||
public updatedAt: Date;
|
||||
|
||||
constructor(init?: Partial<SeasonRequest>) {
|
||||
|
||||
@@ -150,7 +150,10 @@ export class User {
|
||||
@DbAwareColumn({ type: 'datetime', default: () => 'CURRENT_TIMESTAMP' })
|
||||
public createdAt: Date;
|
||||
|
||||
@UpdateDateColumn({ type: resolveDbType('datetime') })
|
||||
@UpdateDateColumn({
|
||||
type: resolveDbType('datetime'),
|
||||
default: () => 'CURRENT_TIMESTAMP',
|
||||
})
|
||||
public updatedAt: Date;
|
||||
|
||||
public warnings: string[] = [];
|
||||
|
||||
@@ -61,7 +61,10 @@ export class Watchlist implements WatchlistItem {
|
||||
@DbAwareColumn({ type: 'datetime', default: () => 'CURRENT_TIMESTAMP' })
|
||||
public createdAt: Date;
|
||||
|
||||
@UpdateDateColumn({ type: resolveDbType('datetime') })
|
||||
@UpdateDateColumn({
|
||||
type: resolveDbType('datetime'),
|
||||
default: () => 'CURRENT_TIMESTAMP',
|
||||
})
|
||||
public updatedAt: Date;
|
||||
|
||||
constructor(init?: Partial<Watchlist>) {
|
||||
|
||||
Reference in New Issue
Block a user