Add syncedAt field in integrations table

This commit is contained in:
Hongbo Wu 2022-08-05 12:27:32 +08:00
parent 8aa7ccdd1e
commit bd73da0571
2 changed files with 4 additions and 0 deletions

View file

@ -36,4 +36,7 @@ export class Integration {
@UpdateDateColumn({ default: () => 'CURRENT_TIMESTAMP' })
updatedAt!: Date
@Column('timestamp', { nullable: true })
syncedAt?: Date | null
}

View file

@ -14,6 +14,7 @@ CREATE TABLE omnivore.integrations (
"enabled" boolean NOT NULL DEFAULT true,
created_at timestamptz NOT NULL DEFAULT current_timestamp,
updated_at timestamptz NOT NULL DEFAULT current_timestamp,
synced_at timestamptz,
UNIQUE (user_id, "type")
);