add fetch_content and folder column to the subscriptions table and folder column to newsletter_emails table
This commit is contained in:
@ -34,4 +34,13 @@ export class NewsletterEmail {
|
||||
|
||||
@OneToMany(() => Subscription, (subscription) => subscription.newsletterEmail)
|
||||
subscriptions!: Subscription[]
|
||||
|
||||
@Column('text')
|
||||
folder!: string
|
||||
|
||||
@Column('text')
|
||||
name?: string | null
|
||||
|
||||
@Column('text')
|
||||
description?: string | null
|
||||
}
|
||||
|
||||
@ -76,4 +76,10 @@ export class Subscription {
|
||||
|
||||
@Column('boolean')
|
||||
autoAddToLibrary?: boolean | null
|
||||
|
||||
@Column('boolean')
|
||||
fetchContent!: boolean
|
||||
|
||||
@Column('text')
|
||||
folder!: string
|
||||
}
|
||||
|
||||
16
packages/db/migrations/0149.do.add_fetch_content_to_subscriptions.sql
Executable file
16
packages/db/migrations/0149.do.add_fetch_content_to_subscriptions.sql
Executable file
@ -0,0 +1,16 @@
|
||||
-- Type: DO
|
||||
-- Name: add_fetch_content_to_subscriptions
|
||||
-- Description: Add fetch_content column to subscriptions tables
|
||||
|
||||
BEGIN;
|
||||
|
||||
ALTER TABLE omnivore.subscriptions
|
||||
ADD COLUMN fetch_content BOOLEAN NOT NULL DEFAULT TRUE,
|
||||
ADD COLUMN folder TEXT NOT NULL DEFAULT 'following';
|
||||
|
||||
ALTER TABLE omnivore.newsletter_emails
|
||||
ADD COLUMN name TEXT,
|
||||
ADD COLUMN description TEXT,
|
||||
ADD COLUMN folder TEXT NOT NULL DEFAULT 'inbox';
|
||||
|
||||
COMMIT;
|
||||
16
packages/db/migrations/0149.undo.add_fetch_content_to_subscriptions.sql
Executable file
16
packages/db/migrations/0149.undo.add_fetch_content_to_subscriptions.sql
Executable file
@ -0,0 +1,16 @@
|
||||
-- Type: UNDO
|
||||
-- Name: add_fetch_content_to_subscriptions
|
||||
-- Description: Add fetch_content column to subscriptions tables
|
||||
|
||||
BEGIN;
|
||||
|
||||
ALTER TABLE omnivore.subscriptions
|
||||
DROP COLUMN fetch_content,
|
||||
DROP COLUMN folder;
|
||||
|
||||
ALTER TABLE omnivore.newsletter_emails
|
||||
DROP COLUMN name,
|
||||
DROP COLUMN description,
|
||||
DROP COLUMN folder;
|
||||
|
||||
COMMIT;
|
||||
Reference in New Issue
Block a user