Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions liquibase/changes/official_tag_update.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
-- Query to update official tag for feeds with contact email in the feed table where the source is mdb

UPDATE public.feed f
SET official = TRUE
FROM public.externalid e
WHERE f.id = e.feed_id
AND f.feed_contact_email LIKE '%@%'
AND e.source = 'mdb';

-- Query to insert a record in officialstatushistory table for feeds with contact email in the feed table where the source is mdb
INSERT INTO public.officialstatushistory (is_official, feed_id, reviewer_email, timestamp, notes)
SELECT
official,
id,
'[email protected]',
NOW(),
'Official status tag changed'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I find this note to be a bit generic.
Maybe you can ask @emmambd for a note that is specific to the operation done here.
Like: Official status set after manual verification of initial DB contents.
Or something like this.
Or maybe it's not important.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where does this alert show up? I think keeping is general is okay in case there's a world where we do automate this in the future

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@emmambd it shows up as a note in the officialstatushistory table for the feeds i set to official.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it lives in the DB I think that is sufficient.

FROM public.feed
WHERE feed_contact_email LIKE '%@%'
AND official = TRUE;
Loading