Remove token in features table

This commit is contained in:
Hongbo Wu
2022-11-09 11:32:08 +08:00
parent c2f4ba4a57
commit 98f59c50f0
3 changed files with 6 additions and 6 deletions

View File

@ -21,12 +21,12 @@ export class Feature {
@Column('text')
name!: string
@Column('text')
token!: string
@Column('timestamp', { nullable: true })
grantedAt?: Date | null
@Column('timestamp', { nullable: true })
expiredAt?: Date | null
@CreateDateColumn({ default: () => 'CURRENT_TIMESTAMP' })
createdAt!: Date

View File

@ -8,8 +8,8 @@ CREATE TABLE IF NOT EXISTS omnivore.features (
id uuid PRIMARY KEY DEFAULT uuid_generate_v1mc(),
user_id uuid NOT NULL REFERENCES omnivore.user ON DELETE CASCADE,
name text NOT NULL,
token text NOT NULL,
granted_at timestamptz,
expired_at timestamptz,
created_at timestamptz NOT NULL DEFAULT current_timestamp,
updated_at timestamptz NOT NULL DEFAULT current_timestamp,
UNIQUE (user_id, name)

View File

@ -8,7 +8,7 @@ DROP TABLE IF EXISTS omnivore.features;
ALTER TABLE omnivore.user_personalization
DROP COLUMN IF EXISTS speech_secondary_voice,
ALTER COLUMN speech_rate TYPE integer,
ALTER COLUMN speech_volume TYPE integer;
ALTER COLUMN speech_rate TYPE integer USING speech_rate::integer,
ALTER COLUMN speech_volume TYPE integer USING speech_volume::integer;
COMMIT;