Replace keyword with term

This commit is contained in:
Hongbo Wu 2022-10-11 11:26:18 +08:00
parent cd13e5874a
commit 4e14518189
2 changed files with 2 additions and 2 deletions

View file

@ -19,7 +19,7 @@ export class SearchHistory {
user!: User
@Column('varchar', { length: 255 })
keyword!: string
term!: string
@CreateDateColumn({ default: () => 'CURRENT_TIMESTAMP' })
createdAt!: Date

View file

@ -7,7 +7,7 @@ BEGIN;
CREATE TABLE omnivore.search_history (
id uuid PRIMARY KEY DEFAULT uuid_generate_v1mc(),
user_id uuid NOT NULL REFERENCES omnivore.user ON DELETE CASCADE,
keyword VARCHAR(255) NOT NULL,
term VARCHAR(255) NOT NULL,
created_at timestamptz NOT NULL DEFAULT current_timestamp,
updated_at timestamptz NOT NULL DEFAULT current_timestamp
);