Skip to content

Instantly share code, notes, and snippets.

@vinnyjth
Created May 16, 2024 19:17
Show Gist options
  • Save vinnyjth/eb642e96948ea7e1d9c60c17e1633eb6 to your computer and use it in GitHub Desktop.
Save vinnyjth/eb642e96948ea7e1d9c60c17e1633eb6 to your computer and use it in GitHub Desktop.

Diff Summary.

diff File

The diff file describes the net changes across the total DB. You should expect changes to this file to represent intended changes to the shovel output. If you are performing a refactor, with no intended code changes, you should expect no changes to this file.

csv File

The csv file represents all operations that were performed that resulted in a data update. This doesn't including touching a content item (only updating a timestamp), but does include wiping a field out and then restoring that field to it's original contents. It will also track id changes.

Optimally, a dag that is not producing changes should not be wiping/restoring data on a run (should produce an empty csv). Practically, we have a long way to go in this area. Some operations (such as keeping track of content_tags) is easier to do by wiping the table and restoring, which produces operations, but doesn't result in a net diff.

36c36
< 532bfcbd-70f8-4f16-8cf3-6aca2943d0bc UT \N \N \N \N Campus 4 ministry_platform \N \N f \N apollos_demo campus
---
> 532bfcbd-70f8-4f16-8cf3-6aca2943d0bc UT \N \N \N \N Campus 4 ministry_platform \N \N f 621c3816-770f-4ae9-b473-df37573e6b41 apollos_demo campus
46c46
< b9e708b5-7672-4d81-aa26-baf7361418c3 Friends \N \N \N \N Campus 2 ministry_platform \N \N f \N apollos_demo campus
---
> b9e708b5-7672-4d81-aa26-baf7361418c3 Friends \N \N \N \N Campus 2 ministry_platform \N \N f 621c3816-770f-4ae9-b473-df37573e6b41 apollos_demo campus
56c56
< ff21e4ce-ed27-43e5-b0fa-22579775c95f Campbell 2301 Jacksboro Pike Suite 3 \N LaFollette TN 37766 36.34487 -84.161683 \N \N Campus 5 ministry_platform \N \N f \N apollos_demo campus
---
> ff21e4ce-ed27-43e5-b0fa-22579775c95f Campbell 2301 Jacksboro Pike Suite 3 \N LaFollette TN 37766 36.34487 -84.161683 \N \N Campus 5 ministry_platform \N \N f 621c3816-770f-4ae9-b473-df37573e6b41 apollos_demo campus
1451c1451
< IMAGE https://groups-production.s3.amazonaws.com/uploads/group/header_image/defaults/3.png 2208972d-5008-47de-81f0-5b4fc7eca0a1 Community https://groups-production.s3.amazonaws.com/uploads/group/header_image/defaults/3.png planning_center 3ca34ad3-17e4-469f-81fc-b51ef27bb9b9 ImageMedia \N \N {} apollos_demo media
---
> IMAGE https://groups-production.s3.amazonaws.com/uploads/group/header_image/defaults/3.png 2208972d-5008-47de-81f0-5b4fc7eca0a1 Community https://groups-production.s3.amazonaws.com/uploads/group/header_image/defaults/3.png planning_center 3ca34ad3-17e4-469f-81fc-b51ef27bb9b9 ImageMedia \N \N {"width": 1280, "height": 720} apollos_demo media
1869c1869
< IMAGE https://rock.apollos.app/GetImage.ashx?guid=4e181881-b156-48b0-be40-54af2b14b3fb 33f8d94d-09f0-489a-98d0-2d2f11961b37 Campus campusimage-71 rock 621c3816-770f-4ae9-b473-df37573e6b41 IMAGE \N \N {"width": 183, "height": 183} apollos_demo media
---
> IMAGE https://rock.apollos.app/GetImage.ashx?guid=4e181881-b156-48b0-be40-54af2b14b3fb ff21e4ce-ed27-43e5-b0fa-22579775c95f Campus campusimage-71 rock 621c3816-770f-4ae9-b473-df37573e6b41 IMAGE \N \N {"width": 183, "height": 183} apollos_demo media
table_name changed_fields client_query action row_data
media "node_id"=>"d8704129-debb-4f72-9261-aa0ae6fff113" INSERT INTO media (apollos_type, created_at, updated_at, node_id, node_type, type, url, origin_id, origin_type) VALUES ('IMAGE','2024-05-16T19:13:49.846825+00:00'::timestamptz,'2024-05-16T19:13:49.846825+00:00'::timestamptz,'d8704129-debb-4f72-9261-aa0ae6fff113','Campus','IMAGE','https://rock.apollos.app/GetImage.ashx?guid=4e181881-b156-48b0-be40-54af2b14b3fb','campusimage-71','rock') ON CONFLICT (origin_id, church_slug, origin_type) DO UPDATE SET apollos_type = excluded.apollos_type, created_at = excluded.created_at, updated_at = excluded.updated_at, node_id = excluded.node_id, node_type = excluded.node_type, type = excluded.type, url = excluded.url U "id"=>"621c3816-770f-4ae9-b473-df37573e6b41","url"=>"https://rock.apollos.app/GetImage.ashx?guid=4e181881-b156-48b0-be40-54af2b14b3fb","type"=>"IMAGE","node_id"=>"33f8d94d-09f0-489a-98d0-2d2f11961b37","metadata"=>"{\"width\": 183, \"height\": 183}","node_type"=>"Campus","origin_id"=>"campusimage-71","apollos_id"=>"IMAGE:621c3816-770f-4ae9-b473-df37573e6b41","church_slug"=>"apollos_demo","origin_type"=>"rock","apollos_type"=>"IMAGE"
media "node_id"=>"b9e708b5-7672-4d81-aa26-baf7361418c3" INSERT INTO media (apollos_type, created_at, updated_at, node_id, node_type, type, url, origin_id, origin_type) VALUES ('IMAGE','2024-05-16T19:13:49.846825+00:00'::timestamptz,'2024-05-16T19:13:49.846825+00:00'::timestamptz,'b9e708b5-7672-4d81-aa26-baf7361418c3','Campus','IMAGE','https://rock.apollos.app/GetImage.ashx?guid=4e181881-b156-48b0-be40-54af2b14b3fb','campusimage-71','rock') ON CONFLICT (origin_id, church_slug, origin_type) DO UPDATE SET apollos_type = excluded.apollos_type, created_at = excluded.created_at, updated_at = excluded.updated_at, node_id = excluded.node_id, node_type = excluded.node_type, type = excluded.type, url = excluded.url U "id"=>"621c3816-770f-4ae9-b473-df37573e6b41","url"=>"https://rock.apollos.app/GetImage.ashx?guid=4e181881-b156-48b0-be40-54af2b14b3fb","type"=>"IMAGE","node_id"=>"d8704129-debb-4f72-9261-aa0ae6fff113","metadata"=>"{\"width\": 183, \"height\": 183}","node_type"=>"Campus","origin_id"=>"campusimage-71","apollos_id"=>"IMAGE:621c3816-770f-4ae9-b473-df37573e6b41","church_slug"=>"apollos_demo","origin_type"=>"rock","apollos_type"=>"IMAGE"
media "node_id"=>"532bfcbd-70f8-4f16-8cf3-6aca2943d0bc" INSERT INTO media (apollos_type, created_at, updated_at, node_id, node_type, type, url, origin_id, origin_type) VALUES ('IMAGE','2024-05-16T19:13:49.846825+00:00'::timestamptz,'2024-05-16T19:13:49.846825+00:00'::timestamptz,'532bfcbd-70f8-4f16-8cf3-6aca2943d0bc','Campus','IMAGE','https://rock.apollos.app/GetImage.ashx?guid=4e181881-b156-48b0-be40-54af2b14b3fb','campusimage-71','rock') ON CONFLICT (origin_id, church_slug, origin_type) DO UPDATE SET apollos_type = excluded.apollos_type, created_at = excluded.created_at, updated_at = excluded.updated_at, node_id = excluded.node_id, node_type = excluded.node_type, type = excluded.type, url = excluded.url U "id"=>"621c3816-770f-4ae9-b473-df37573e6b41","url"=>"https://rock.apollos.app/GetImage.ashx?guid=4e181881-b156-48b0-be40-54af2b14b3fb","type"=>"IMAGE","node_id"=>"b9e708b5-7672-4d81-aa26-baf7361418c3","metadata"=>"{\"width\": 183, \"height\": 183}","node_type"=>"Campus","origin_id"=>"campusimage-71","apollos_id"=>"IMAGE:621c3816-770f-4ae9-b473-df37573e6b41","church_slug"=>"apollos_demo","origin_type"=>"rock","apollos_type"=>"IMAGE"
media "node_id"=>"ff21e4ce-ed27-43e5-b0fa-22579775c95f" INSERT INTO media (apollos_type, created_at, updated_at, node_id, node_type, type, url, origin_id, origin_type) VALUES ('IMAGE','2024-05-16T19:13:49.846825+00:00'::timestamptz,'2024-05-16T19:13:49.846825+00:00'::timestamptz,'ff21e4ce-ed27-43e5-b0fa-22579775c95f','Campus','IMAGE','https://rock.apollos.app/GetImage.ashx?guid=4e181881-b156-48b0-be40-54af2b14b3fb','campusimage-71','rock') ON CONFLICT (origin_id, church_slug, origin_type) DO UPDATE SET apollos_type = excluded.apollos_type, created_at = excluded.created_at, updated_at = excluded.updated_at, node_id = excluded.node_id, node_type = excluded.node_type, type = excluded.type, url = excluded.url U "id"=>"621c3816-770f-4ae9-b473-df37573e6b41","url"=>"https://rock.apollos.app/GetImage.ashx?guid=4e181881-b156-48b0-be40-54af2b14b3fb","type"=>"IMAGE","node_id"=>"532bfcbd-70f8-4f16-8cf3-6aca2943d0bc","metadata"=>"{\"width\": 183, \"height\": 183}","node_type"=>"Campus","origin_id"=>"campusimage-71","apollos_id"=>"IMAGE:621c3816-770f-4ae9-b473-df37573e6b41","church_slug"=>"apollos_demo","origin_type"=>"rock","apollos_type"=>"IMAGE"
campus "image_id"=>"621c3816-770f-4ae9-b473-df37573e6b41" UPDATE campus SET image_id = media.id FROM media WHERE campus.id = 'b9e708b5-7672-4d81-aa26-baf7361418c3' AND media.origin_id = 'campusimage-71' U "id"=>"b9e708b5-7672-4d81-aa26-baf7361418c3","city"=>"","name"=>"Friends","state"=>"","active"=>"f","digital"=>NULL,"street1"=>"","street2"=>"","image_id"=>NULL,"latitude"=>NULL,"image_url"=>NULL,"longitude"=>NULL,"origin_id"=>"2","apollos_id"=>"Campus:b9e708b5-7672-4d81-aa26-baf7361418c3","church_slug"=>"apollos_demo","origin_type"=>"ministry_platform","postal_code"=>"","apollos_type"=>"Campus"
campus "image_id"=>"621c3816-770f-4ae9-b473-df37573e6b41" UPDATE campus SET image_id = media.id FROM media WHERE campus.id = '532bfcbd-70f8-4f16-8cf3-6aca2943d0bc' AND media.origin_id = 'campusimage-71' U "id"=>"532bfcbd-70f8-4f16-8cf3-6aca2943d0bc","city"=>"","name"=>"UT","state"=>"","active"=>"f","digital"=>NULL,"street1"=>"","street2"=>"","image_id"=>NULL,"latitude"=>NULL,"image_url"=>NULL,"longitude"=>NULL,"origin_id"=>"4","apollos_id"=>"Campus:532bfcbd-70f8-4f16-8cf3-6aca2943d0bc","church_slug"=>"apollos_demo","origin_type"=>"ministry_platform","postal_code"=>"","apollos_type"=>"Campus"
campus "image_id"=>"621c3816-770f-4ae9-b473-df37573e6b41" UPDATE campus SET image_id = media.id FROM media WHERE campus.id = 'ff21e4ce-ed27-43e5-b0fa-22579775c95f' AND media.origin_id = 'campusimage-71' U "id"=>"ff21e4ce-ed27-43e5-b0fa-22579775c95f","city"=>"LaFollette","name"=>"Campbell","state"=>"TN","active"=>"f","digital"=>NULL,"street1"=>"2301 Jacksboro Pike Suite 3","street2"=>NULL,"image_id"=>NULL,"latitude"=>"36.34487","image_url"=>NULL,"longitude"=>"-84.161683","origin_id"=>"5","apollos_id"=>"Campus:ff21e4ce-ed27-43e5-b0fa-22579775c95f","church_slug"=>"apollos_demo","origin_type"=>"ministry_platform","postal_code"=>"37766","apollos_type"=>"Campus"
node_slug "node_id"=>"2783ce8b-9c6a-4a22-9848-47650f6567c9" INSERT INTO node_slug (created_at, updated_at, slug, node_type, node_id) SELECT '2024-05-16 19:14:09.308236+00:00', '2024-05-16 19:14:09.308236+00:00', 'giving', 'ContentItem', content_item.id FROM content_item WHERE origin_id = '56' AND origin_type = 'rock' ON CONFLICT (slug, church_slug) DO UPDATE SET node_id = EXCLUDED.node_id U "id"=>"fccfa548-767f-499c-b1d2-958aa80c680b","slug"=>"giving","node_id"=>"2da43b39-0aa7-4a1f-8458-61fcf52dade4","node_type"=>"ContentItem","church_slug"=>"apollos_demo"
node_slug "node_id"=>"2da43b39-0aa7-4a1f-8458-61fcf52dade4" INSERT INTO node_slug (created_at, updated_at, slug, node_type, node_id) SELECT '2024-05-16 19:14:09.308236+00:00', '2024-05-16 19:14:09.308236+00:00', 'giving', 'ContentItem', content_item.id FROM content_item WHERE origin_id = '55' AND origin_type = 'rock' ON CONFLICT (slug, church_slug) DO UPDATE SET node_id = EXCLUDED.node_id U "id"=>"fccfa548-767f-499c-b1d2-958aa80c680b","slug"=>"giving","node_id"=>"2783ce8b-9c6a-4a22-9848-47650f6567c9","node_type"=>"ContentItem","church_slug"=>"apollos_demo"
node_slug "node_id"=>"49a058ce-9588-4662-8eea-fddc1d3a7860" INSERT INTO node_slug (created_at, updated_at, slug, node_type, node_id) SELECT '2024-05-16 19:14:09.308236+00:00', '2024-05-16 19:14:09.308236+00:00', 'at-the-movies', 'ContentItem', content_item.id FROM content_item WHERE origin_id = '45' AND origin_type = 'rock' ON CONFLICT (slug, church_slug) DO UPDATE SET node_id = EXCLUDED.node_id U "id"=>"d66c5185-4180-4fe2-94e3-b73fb3561fbe","slug"=>"at-the-movies","node_id"=>"39b293cf-8d0b-4f5f-bdb3-c15176c46bdd","node_type"=>"ContentItem","church_slug"=>"apollos_demo"
node_slug "node_id"=>"0b71e0bf-e1a1-4b1e-9c9f-8b97db08092c" INSERT INTO node_slug (created_at, updated_at, slug, node_type, node_id) SELECT '2024-05-16 19:14:09.308236+00:00', '2024-05-16 19:14:09.308236+00:00', '1x8', 'ContentItem', content_item.id FROM content_item WHERE origin_id = '44' AND origin_type = 'rock' ON CONFLICT (slug, church_slug) DO UPDATE SET node_id = EXCLUDED.node_id U "id"=>"3b8f3397-c6f8-49fd-ac58-0c113c7dc9df","slug"=>"1x8","node_id"=>"b0648415-8317-4e9c-8dd6-b45052311589","node_type"=>"ContentItem","church_slug"=>"apollos_demo"
node_slug "node_id"=>"c7b4ee8e-0caa-43f3-b3cc-8613c5adf8fe" INSERT INTO node_slug (created_at, updated_at, slug, node_type, node_id) SELECT '2024-05-16 19:14:09.308236+00:00', '2024-05-16 19:14:09.308236+00:00', 'potential', 'ContentItem', content_item.id FROM content_item WHERE origin_id = '43' AND origin_type = 'rock' ON CONFLICT (slug, church_slug) DO UPDATE SET node_id = EXCLUDED.node_id U "id"=>"c4d98bea-3140-4193-b02e-7e11f2f3c099","slug"=>"potential","node_id"=>"296774e1-7387-4d10-aba3-384841ac5688","node_type"=>"ContentItem","church_slug"=>"apollos_demo"
node_slug "node_id"=>"0506f72b-fff2-417e-9ead-7e72986cfb7a" INSERT INTO node_slug (created_at, updated_at, slug, node_type, node_id) SELECT '2024-05-16 19:14:09.308236+00:00', '2024-05-16 19:14:09.308236+00:00', 'arrival', 'ContentItem', content_item.id FROM content_item WHERE origin_id = '41' AND origin_type = 'rock' ON CONFLICT (slug, church_slug) DO UPDATE SET node_id = EXCLUDED.node_id U "id"=>"5f3c4d9b-2e25-47ee-b61d-fd576d8e1d8a","slug"=>"arrival","node_id"=>"b22d140c-06db-4b62-9f85-f87e127002b1","node_type"=>"ContentItem","church_slug"=>"apollos_demo"
node_slug "node_id"=>"39b293cf-8d0b-4f5f-bdb3-c15176c46bdd" INSERT INTO node_slug (created_at, updated_at, slug, node_type, node_id) SELECT '2024-05-16 19:14:09.308236+00:00', '2024-05-16 19:14:09.308236+00:00', 'at-the-movies', 'ContentItem', content_item.id FROM content_item WHERE origin_id = '29' AND origin_type = 'rock' ON CONFLICT (slug, church_slug) DO UPDATE SET node_id = EXCLUDED.node_id U "id"=>"d66c5185-4180-4fe2-94e3-b73fb3561fbe","slug"=>"at-the-movies","node_id"=>"49a058ce-9588-4662-8eea-fddc1d3a7860","node_type"=>"ContentItem","church_slug"=>"apollos_demo"
node_slug "node_id"=>"b0648415-8317-4e9c-8dd6-b45052311589" INSERT INTO node_slug (created_at, updated_at, slug, node_type, node_id) SELECT '2024-05-16 19:14:09.308236+00:00', '2024-05-16 19:14:09.308236+00:00', '1x8', 'ContentItem', content_item.id FROM content_item WHERE origin_id = '28' AND origin_type = 'rock' ON CONFLICT (slug, church_slug) DO UPDATE SET node_id = EXCLUDED.node_id U "id"=>"3b8f3397-c6f8-49fd-ac58-0c113c7dc9df","slug"=>"1x8","node_id"=>"0b71e0bf-e1a1-4b1e-9c9f-8b97db08092c","node_type"=>"ContentItem","church_slug"=>"apollos_demo"
node_slug "node_id"=>"296774e1-7387-4d10-aba3-384841ac5688" INSERT INTO node_slug (created_at, updated_at, slug, node_type, node_id) SELECT '2024-05-16 19:14:09.308236+00:00', '2024-05-16 19:14:09.308236+00:00', 'potential', 'ContentItem', content_item.id FROM content_item WHERE origin_id = '27' AND origin_type = 'rock' ON CONFLICT (slug, church_slug) DO UPDATE SET node_id = EXCLUDED.node_id U "id"=>"c4d98bea-3140-4193-b02e-7e11f2f3c099","slug"=>"potential","node_id"=>"c7b4ee8e-0caa-43f3-b3cc-8613c5adf8fe","node_type"=>"ContentItem","church_slug"=>"apollos_demo"
event_tag DELETE FROM event_tag WHERE tag_id IN ( SELECT id FROM tag WHERE origin_type = 'rock' AND origin_id LIKE 'eventAudience-%') D "tag_id"=>"e7d3dd5f-154c-446a-b281-216f8af609df","event_id"=>"55ae3f6a-3c76-4810-8ca2-0338adcf6239","church_slug"=>"apollos_demo"
node_slug "node_id"=>"b22d140c-06db-4b62-9f85-f87e127002b1" INSERT INTO node_slug (created_at, updated_at, slug, node_type, node_id) SELECT '2024-05-16 19:14:09.308236+00:00', '2024-05-16 19:14:09.308236+00:00', 'arrival', 'ContentItem', content_item.id FROM content_item WHERE origin_id = '25' AND origin_type = 'rock' ON CONFLICT (slug, church_slug) DO UPDATE SET node_id = EXCLUDED.node_id U "id"=>"5f3c4d9b-2e25-47ee-b61d-fd576d8e1d8a","slug"=>"arrival","node_id"=>"0506f72b-fff2-417e-9ead-7e72986cfb7a","node_type"=>"ContentItem","church_slug"=>"apollos_demo"
content_tag DELETE FROM content_tag WHERE content_item_id = '0edc3e9f-7f33-4172-bea7-340a25014699' AND tag_id IN ('4153f959-eae8-420a-8086-c2fe78c2cfe2', '2953d767-afa2-45ed-acfb-abbb81e10a89', '4c143a06-ed0f-4db0-a5a0-1128e7d7c67f', 'e0a8a01d-693e-442d-a68f-58ae88b45444', 'c18f4d34-e91a-4601-b2a5-66c2c2a49bb8', 'c44e146b-9f62-4f24-803e-058fb9cc159f', '526e1ccf-344b-4a47-8f27-35e19a32103c') D "tag_id"=>"4c143a06-ed0f-4db0-a5a0-1128e7d7c67f","church_slug"=>"apollos_demo","content_item_id"=>"0edc3e9f-7f33-4172-bea7-340a25014699"
content_tag INSERT INTO content_tag (tag_id, content_item_id, created_at, updated_at) VALUES ('4c143a06-ed0f-4db0-a5a0-1128e7d7c67f', '0edc3e9f-7f33-4172-bea7-340a25014699', NOW(), NOW()) I "tag_id"=>"4c143a06-ed0f-4db0-a5a0-1128e7d7c67f","church_slug"=>"apollos_demo","content_item_id"=>"0edc3e9f-7f33-4172-bea7-340a25014699"
media "metadata"=>"{\"width\": 1280, \"height\": 720}" UPDATE media SET metadata = metadata || '{"width": 1280,"height": 720}'::jsonb WHERE id = '3ca34ad3-17e4-469f-81fc-b51ef27bb9b9'::uuid U "id"=>"3ca34ad3-17e4-469f-81fc-b51ef27bb9b9","url"=>"https://groups-production.s3.amazonaws.com/uploads/group/header_image/defaults/3.png","type"=>"IMAGE","node_id"=>"2208972d-5008-47de-81f0-5b4fc7eca0a1","metadata"=>"{}","node_type"=>"Community","origin_id"=>"https://groups-production.s3.amazonaws.com/uploads/group/header_image/defaults/3.png","apollos_id"=>"ImageMedia:3ca34ad3-17e4-469f-81fc-b51ef27bb9b9","church_slug"=>"apollos_demo","origin_type"=>"planning_center","apollos_type"=>"ImageMedia"
media "metadata"=>"{}" INSERT INTO media (apollos_type, created_at, updated_at, node_id, node_type, type, url, origin_id, origin_type, metadata) VALUES ('ImageMedia','2024-05-16T19:14:37.494868+00:00'::timestamptz,'2024-05-16T19:14:37.494868+00:00'::timestamptz,NULL,NULL,'IMAGE','https://rock.apollos.app/GetImage.ashx?guid=8ee5a840-0a10-44e2-9dbe-214af27c234b',13,'rock','{}') ON CONFLICT (origin_id, church_slug, origin_type) DO UPDATE SET apollos_type = excluded.apollos_type, created_at = excluded.created_at, updated_at = excluded.updated_at, node_id = excluded.node_id, node_type = excluded.node_type, type = excluded.type, url = excluded.url, metadata = excluded.metadata U "id"=>"7aa510e0-406f-4e8d-8b05-96ff02a475dd","url"=>"https://rock.apollos.app/GetImage.ashx?guid=8ee5a840-0a10-44e2-9dbe-214af27c234b","type"=>"IMAGE","node_id"=>NULL,"metadata"=>"{\"audio\": {\"codec\": \"ISO/IEC 14496-3 AAC\", \"channels\": 2, \"lossless\": false, \"dataformat\": \"mp4\", \"channelmode\": \"stereo\", \"sample_rate\": 48000, \"bits_per_sample\": 16}, \"sizes\": {}, \"width\": 426, \"height\": 240, \"length\": 488, \"duration\": 488, \"filesize\": 13138402, \"mime_type\": \"video/mp4\", \"dataformat\": \"quicktime\", \"fileformat\": \"mp4\", \"length_formatted\": \"8:08\", \"created_timestamp\": 1613140927}","node_type"=>NULL,"origin_id"=>"13","apollos_id"=>"ImageMedia:7aa510e0-406f-4e8d-8b05-96ff02a475dd","church_slug"=>"apollos_demo","origin_type"=>"rock","apollos_type"=>"ImageMedia"
media "metadata"=>"{}" INSERT INTO media (apollos_type, created_at, updated_at, node_id, node_type, type, url, origin_id, origin_type, metadata) VALUES ('ImageMedia','2024-05-16T19:14:37.494868+00:00'::timestamptz,'2024-05-16T19:14:37.494868+00:00'::timestamptz,NULL,NULL,'IMAGE','https://rock.apollos.app/GetImage.ashx?guid=5047381d-0ca9-49f7-9894-699c296baab6',18,'rock','{}') ON CONFLICT (origin_id, church_slug, origin_type) DO UPDATE SET apollos_type = excluded.apollos_type, created_at = excluded.created_at, updated_at = excluded.updated_at, node_id = excluded.node_id, node_type = excluded.node_type, type = excluded.type, url = excluded.url, metadata = excluded.metadata U "id"=>"6114123c-11ae-450a-a122-043378cf083a","url"=>"https://rock.apollos.app/GetImage.ashx?guid=5047381d-0ca9-49f7-9894-699c296baab6","type"=>"IMAGE","node_id"=>NULL,"metadata"=>"{\"width\": 960, \"height\": 180}","node_type"=>NULL,"origin_id"=>"18","apollos_id"=>"ImageMedia:6114123c-11ae-450a-a122-043378cf083a","church_slug"=>"apollos_demo","origin_type"=>"rock","apollos_type"=>"ImageMedia"
media "metadata"=>"{}" INSERT INTO media (apollos_type, created_at, updated_at, node_id, node_type, type, url, origin_id, origin_type, metadata) VALUES ('ImageMedia','2024-05-16T19:14:37.494868+00:00'::timestamptz,'2024-05-16T19:14:37.494868+00:00'::timestamptz,NULL,NULL,'IMAGE','https://rock.apollos.app/GetImage.ashx?guid=d00fceaa-2d16-40bf-9ba4-352d42605e28',10,'rock','{}') ON CONFLICT (origin_id, church_slug, origin_type) DO UPDATE SET apollos_type = excluded.apollos_type, created_at = excluded.created_at, updated_at = excluded.updated_at, node_id = excluded.node_id, node_type = excluded.node_type, type = excluded.type, url = excluded.url, metadata = excluded.metadata U "id"=>"f6e4aa5e-c1a4-4ac1-b951-d72a8d60259d","url"=>"https://rock.apollos.app/GetImage.ashx?guid=d00fceaa-2d16-40bf-9ba4-352d42605e28","type"=>"IMAGE","node_id"=>NULL,"metadata"=>"{\"width\": 960, \"height\": 180}","node_type"=>NULL,"origin_id"=>"10","apollos_id"=>"ImageMedia:f6e4aa5e-c1a4-4ac1-b951-d72a8d60259d","church_slug"=>"apollos_demo","origin_type"=>"rock","apollos_type"=>"ImageMedia"
event_tag DELETE FROM event_tag WHERE tag_id IN ( SELECT id FROM tag WHERE origin_type = 'rock' AND origin_id LIKE 'eventAudience-%') D "tag_id"=>"0c5ebc41-4646-495c-9ec5-3a265cdb3c4a","event_id"=>"beb5ba4e-d099-4817-8c43-5c5c4be3763f","church_slug"=>"apollos_demo"
event_tag DELETE FROM event_tag WHERE tag_id IN ( SELECT id FROM tag WHERE origin_type = 'rock' AND origin_id LIKE 'eventAudience-%') D "tag_id"=>"e7d3dd5f-154c-446a-b281-216f8af609df","event_id"=>"beb5ba4e-d099-4817-8c43-5c5c4be3763f","church_slug"=>"apollos_demo"
event_tag DELETE FROM event_tag WHERE tag_id IN ( SELECT id FROM tag WHERE origin_type = 'rock' AND origin_id LIKE 'eventAudience-%') D "tag_id"=>"e7d3dd5f-154c-446a-b281-216f8af609df","event_id"=>"eb05c5e3-5fed-41ab-be44-7f526cac696e","church_slug"=>"apollos_demo"
event_tag DELETE FROM event_tag WHERE tag_id IN ( SELECT id FROM tag WHERE origin_type = 'rock' AND origin_id LIKE 'eventAudience-%') D "tag_id"=>"3d707a1b-d037-4094-b0a9-84c6d1d0fd20","event_id"=>"55ae3f6a-3c76-4810-8ca2-0338adcf6239","church_slug"=>"apollos_demo"
event_tag DELETE FROM event_tag WHERE tag_id IN ( SELECT id FROM tag WHERE origin_type = 'rock' AND origin_id LIKE 'eventAudience-%') D "tag_id"=>"3d707a1b-d037-4094-b0a9-84c6d1d0fd20","event_id"=>"beb5ba4e-d099-4817-8c43-5c5c4be3763f","church_slug"=>"apollos_demo"
event_tag DELETE FROM event_tag WHERE tag_id IN ( SELECT id FROM tag WHERE origin_type = 'rock' AND origin_id LIKE 'eventAudience-%') D "tag_id"=>"3d707a1b-d037-4094-b0a9-84c6d1d0fd20","event_id"=>"eb05c5e3-5fed-41ab-be44-7f526cac696e","church_slug"=>"apollos_demo"
event_tag DELETE FROM event_tag WHERE tag_id IN ( SELECT id FROM tag WHERE origin_type = 'rock' AND origin_id LIKE 'eventAudience-%') D "tag_id"=>"dbe58c68-6cb1-45a6-8ead-4a9e557c0bac","event_id"=>"55ae3f6a-3c76-4810-8ca2-0338adcf6239","church_slug"=>"apollos_demo"
event_tag DELETE FROM event_tag WHERE tag_id IN ( SELECT id FROM tag WHERE origin_type = 'rock' AND origin_id LIKE 'eventAudience-%') D "tag_id"=>"f3a571b1-751f-4b0c-91c4-01c98a6bd6cf","event_id"=>"beb5ba4e-d099-4817-8c43-5c5c4be3763f","church_slug"=>"apollos_demo"
event_tag DELETE FROM event_tag WHERE tag_id IN ( SELECT id FROM tag WHERE origin_type = 'rock' AND origin_id LIKE 'eventAudience-%') D "tag_id"=>"f3a571b1-751f-4b0c-91c4-01c98a6bd6cf","event_id"=>"eb05c5e3-5fed-41ab-be44-7f526cac696e","church_slug"=>"apollos_demo"
event_tag INSERT INTO event_tag (event_id, tag_id, created_at, updated_at) SELECT event.id, tag.id, tag.created_at, tag.updated_at FROM event INNER JOIN tag ON tag.origin_id = 'eventAudience-148' AND tag.origin_type = 'rock' WHERE event.origin_id ~ '^2(-\d+)?$' AND event.origin_type = 'rock' ON CONFLICT (tag_id, event_id) DO NOTHING I "tag_id"=>"e7d3dd5f-154c-446a-b281-216f8af609df","event_id"=>"eb05c5e3-5fed-41ab-be44-7f526cac696e","church_slug"=>"apollos_demo"
event_tag INSERT INTO event_tag (event_id, tag_id, created_at, updated_at) SELECT event.id, tag.id, tag.created_at, tag.updated_at FROM event INNER JOIN tag ON tag.origin_id = 'eventAudience-151' AND tag.origin_type = 'rock' WHERE event.origin_id ~ '^2(-\d+)?$' AND event.origin_type = 'rock' ON CONFLICT (tag_id, event_id) DO NOTHING I "tag_id"=>"f3a571b1-751f-4b0c-91c4-01c98a6bd6cf","event_id"=>"eb05c5e3-5fed-41ab-be44-7f526cac696e","church_slug"=>"apollos_demo"
event_tag INSERT INTO event_tag (event_id, tag_id, created_at, updated_at) SELECT event.id, tag.id, tag.created_at, tag.updated_at FROM event INNER JOIN tag ON tag.origin_id = 'eventAudience-24' AND tag.origin_type = 'rock' WHERE event.origin_id ~ '^2(-\d+)?$' AND event.origin_type = 'rock' ON CONFLICT (tag_id, event_id) DO NOTHING I "tag_id"=>"3d707a1b-d037-4094-b0a9-84c6d1d0fd20","event_id"=>"eb05c5e3-5fed-41ab-be44-7f526cac696e","church_slug"=>"apollos_demo"
event_tag INSERT INTO event_tag (event_id, tag_id, created_at, updated_at) SELECT event.id, tag.id, tag.created_at, tag.updated_at FROM event INNER JOIN tag ON tag.origin_id = 'eventAudience-148' AND tag.origin_type = 'rock' WHERE event.origin_id ~ '^3(-\d+)?$' AND event.origin_type = 'rock' ON CONFLICT (tag_id, event_id) DO NOTHING I "tag_id"=>"e7d3dd5f-154c-446a-b281-216f8af609df","event_id"=>"beb5ba4e-d099-4817-8c43-5c5c4be3763f","church_slug"=>"apollos_demo"
event_tag INSERT INTO event_tag (event_id, tag_id, created_at, updated_at) SELECT event.id, tag.id, tag.created_at, tag.updated_at FROM event INNER JOIN tag ON tag.origin_id = 'eventAudience-151' AND tag.origin_type = 'rock' WHERE event.origin_id ~ '^3(-\d+)?$' AND event.origin_type = 'rock' ON CONFLICT (tag_id, event_id) DO NOTHING I "tag_id"=>"f3a571b1-751f-4b0c-91c4-01c98a6bd6cf","event_id"=>"beb5ba4e-d099-4817-8c43-5c5c4be3763f","church_slug"=>"apollos_demo"
event_tag INSERT INTO event_tag (event_id, tag_id, created_at, updated_at) SELECT event.id, tag.id, tag.created_at, tag.updated_at FROM event INNER JOIN tag ON tag.origin_id = 'eventAudience-152' AND tag.origin_type = 'rock' WHERE event.origin_id ~ '^3(-\d+)?$' AND event.origin_type = 'rock' ON CONFLICT (tag_id, event_id) DO NOTHING I "tag_id"=>"0c5ebc41-4646-495c-9ec5-3a265cdb3c4a","event_id"=>"beb5ba4e-d099-4817-8c43-5c5c4be3763f","church_slug"=>"apollos_demo"
event_tag INSERT INTO event_tag (event_id, tag_id, created_at, updated_at) SELECT event.id, tag.id, tag.created_at, tag.updated_at FROM event INNER JOIN tag ON tag.origin_id = 'eventAudience-24' AND tag.origin_type = 'rock' WHERE event.origin_id ~ '^3(-\d+)?$' AND event.origin_type = 'rock' ON CONFLICT (tag_id, event_id) DO NOTHING I "tag_id"=>"3d707a1b-d037-4094-b0a9-84c6d1d0fd20","event_id"=>"beb5ba4e-d099-4817-8c43-5c5c4be3763f","church_slug"=>"apollos_demo"
event_tag INSERT INTO event_tag (event_id, tag_id, created_at, updated_at) SELECT event.id, tag.id, tag.created_at, tag.updated_at FROM event INNER JOIN tag ON tag.origin_id = 'eventAudience-148' AND tag.origin_type = 'rock' WHERE event.origin_id ~ '^4(-\d+)?$' AND event.origin_type = 'rock' ON CONFLICT (tag_id, event_id) DO NOTHING I "tag_id"=>"e7d3dd5f-154c-446a-b281-216f8af609df","event_id"=>"55ae3f6a-3c76-4810-8ca2-0338adcf6239","church_slug"=>"apollos_demo"
event_tag INSERT INTO event_tag (event_id, tag_id, created_at, updated_at) SELECT event.id, tag.id, tag.created_at, tag.updated_at FROM event INNER JOIN tag ON tag.origin_id = 'eventAudience-24' AND tag.origin_type = 'rock' WHERE event.origin_id ~ '^4(-\d+)?$' AND event.origin_type = 'rock' ON CONFLICT (tag_id, event_id) DO NOTHING I "tag_id"=>"3d707a1b-d037-4094-b0a9-84c6d1d0fd20","event_id"=>"55ae3f6a-3c76-4810-8ca2-0338adcf6239","church_slug"=>"apollos_demo"
event_tag INSERT INTO event_tag (event_id, tag_id, created_at, updated_at) SELECT event.id, tag.id, tag.created_at, tag.updated_at FROM event INNER JOIN tag ON tag.origin_id = 'eventAudience-147' AND tag.origin_type = 'rock' WHERE event.origin_id ~ '^4(-\d+)?$' AND event.origin_type = 'rock' ON CONFLICT (tag_id, event_id) DO NOTHING I "tag_id"=>"dbe58c68-6cb1-45a6-8ead-4a9e557c0bac","event_id"=>"55ae3f6a-3c76-4810-8ca2-0338adcf6239","church_slug"=>"apollos_demo"
media "metadata"=>"{\"audio\": {\"codec\": \"ISO/IEC 14496-3 AAC\", \"channels\": 2, \"lossless\": false, \"dataformat\": \"mp4\", \"channelmode\": \"stereo\", \"sample_rate\": 48000, \"bits_per_sample\": 16}, \"sizes\": {}, \"width\": 426, \"height\": 240, \"length\": 488, \"duration\": 488, \"filesize\": 13138402, \"mime_type\": \"video/mp4\", \"dataformat\": \"quicktime\", \"fileformat\": \"mp4\", \"length_formatted\": \"8:08\", \"created_timestamp\": 1613140927}" UPDATE media SET metadata = metadata::jsonb || '{"filesize": 13138402,"mime_type": "video/mp4","length": 488,"length_formatted": "8:08","width": 426,"height": 240,"fileformat": "mp4","dataformat": "quicktime","audio": {"dataformat": "mp4","codec": "ISO/IEC 14496-3 AAC","sample_rate": 48000,"channels": 2,"bits_per_sample": 16,"lossless": false,"channelmode": "stereo"},"created_timestamp": 1613140927,"sizes": {},"duration": 488}'::jsonb WHERE origin_id = '13' U "id"=>"7aa510e0-406f-4e8d-8b05-96ff02a475dd","url"=>"https://rock.apollos.app/GetImage.ashx?guid=8ee5a840-0a10-44e2-9dbe-214af27c234b","type"=>"IMAGE","node_id"=>NULL,"metadata"=>"{}","node_type"=>NULL,"origin_id"=>"13","apollos_id"=>"ImageMedia:7aa510e0-406f-4e8d-8b05-96ff02a475dd","church_slug"=>"apollos_demo","origin_type"=>"rock","apollos_type"=>"ImageMedia"
media "metadata"=>"{\"width\": 960, \"height\": 180}" UPDATE media SET metadata = metadata || '{"width": 960,"height": 180}'::jsonb WHERE id = '6114123c-11ae-450a-a122-043378cf083a'::uuid U "id"=>"6114123c-11ae-450a-a122-043378cf083a","url"=>"https://rock.apollos.app/GetImage.ashx?guid=5047381d-0ca9-49f7-9894-699c296baab6","type"=>"IMAGE","node_id"=>NULL,"metadata"=>"{}","node_type"=>NULL,"origin_id"=>"18","apollos_id"=>"ImageMedia:6114123c-11ae-450a-a122-043378cf083a","church_slug"=>"apollos_demo","origin_type"=>"rock","apollos_type"=>"ImageMedia"
media "metadata"=>"{\"width\": 960, \"height\": 180}" UPDATE media SET metadata = metadata || '{"width": 960,"height": 180}'::jsonb WHERE id = 'f6e4aa5e-c1a4-4ac1-b951-d72a8d60259d'::uuid U "id"=>"f6e4aa5e-c1a4-4ac1-b951-d72a8d60259d","url"=>"https://rock.apollos.app/GetImage.ashx?guid=d00fceaa-2d16-40bf-9ba4-352d42605e28","type"=>"IMAGE","node_id"=>NULL,"metadata"=>"{}","node_type"=>NULL,"origin_id"=>"10","apollos_id"=>"ImageMedia:f6e4aa5e-c1a4-4ac1-b951-d72a8d60259d","church_slug"=>"apollos_demo","origin_type"=>"rock","apollos_type"=>"ImageMedia"
content_tag DELETE from content_tag USING tag WHERE content_tag.content_item_id in ('afa092c8-19bc-4336-a4ed-2d07910a4bfe') AND content_tag.tag_id = tag.id AND (tag.origin_id like 'tag-%' or tag.origin_id like 'category-%') AND tag.origin_type = 'wordpress' D "tag_id"=>"dff16eec-67e7-44ec-a70e-744a9b2c2803","church_slug"=>"apollos_demo","content_item_id"=>"afa092c8-19bc-4336-a4ed-2d07910a4bfe"
content_tag INSERT INTO content_tag (content_item_id, created_at, tag_id, updated_at) VALUES ('afa092c8-19bc-4336-a4ed-2d07910a4bfe','2024-05-16T19:15:05.786422+00:00'::timestamptz,'dff16eec-67e7-44ec-a70e-744a9b2c2803','2024-05-16T19:15:05.786422+00:00'::timestamptz) ON CONFLICT (tag_id, content_item_id) DO UPDATE SET created_at = excluded.created_at, updated_at = excluded.updated_at I "tag_id"=>"dff16eec-67e7-44ec-a70e-744a9b2c2803","church_slug"=>"apollos_demo","content_item_id"=>"afa092c8-19bc-4336-a4ed-2d07910a4bfe"
content_tag DELETE from content_tag USING tag WHERE content_tag.content_item_id in ('a00d3445-b2bb-448a-96e2-45f4eedb4e7e','767ac0a3-9005-4cfe-a251-6efa74f77508','c1feed2a-1545-45b1-a812-0dab89c9c5b0','07720437-38b2-4149-864d-7fd8f9271cfa','11169af2-c2ab-406e-8cea-d0b5a066250b') AND content_tag.tag_id = tag.id AND (tag.origin_id like 'tag-%' or tag.origin_id like 'category-%') AND tag.origin_type = 'wordpress' D "tag_id"=>"6fb789e3-7323-4706-8f3c-219f05223ab5","church_slug"=>"apollos_demo","content_item_id"=>"07720437-38b2-4149-864d-7fd8f9271cfa"
content_tag DELETE from content_tag USING tag WHERE content_tag.content_item_id in ('a00d3445-b2bb-448a-96e2-45f4eedb4e7e','767ac0a3-9005-4cfe-a251-6efa74f77508','c1feed2a-1545-45b1-a812-0dab89c9c5b0','07720437-38b2-4149-864d-7fd8f9271cfa','11169af2-c2ab-406e-8cea-d0b5a066250b') AND content_tag.tag_id = tag.id AND (tag.origin_id like 'tag-%' or tag.origin_id like 'category-%') AND tag.origin_type = 'wordpress' D "tag_id"=>"6fb789e3-7323-4706-8f3c-219f05223ab5","church_slug"=>"apollos_demo","content_item_id"=>"a00d3445-b2bb-448a-96e2-45f4eedb4e7e"
content_tag DELETE from content_tag USING tag WHERE content_tag.content_item_id in ('a00d3445-b2bb-448a-96e2-45f4eedb4e7e','767ac0a3-9005-4cfe-a251-6efa74f77508','c1feed2a-1545-45b1-a812-0dab89c9c5b0','07720437-38b2-4149-864d-7fd8f9271cfa','11169af2-c2ab-406e-8cea-d0b5a066250b') AND content_tag.tag_id = tag.id AND (tag.origin_id like 'tag-%' or tag.origin_id like 'category-%') AND tag.origin_type = 'wordpress' D "tag_id"=>"1472d0a5-c4eb-4497-9c9e-dda774b0166f","church_slug"=>"apollos_demo","content_item_id"=>"a00d3445-b2bb-448a-96e2-45f4eedb4e7e"
content_tag DELETE from content_tag USING tag WHERE content_tag.content_item_id in ('a00d3445-b2bb-448a-96e2-45f4eedb4e7e','767ac0a3-9005-4cfe-a251-6efa74f77508','c1feed2a-1545-45b1-a812-0dab89c9c5b0','07720437-38b2-4149-864d-7fd8f9271cfa','11169af2-c2ab-406e-8cea-d0b5a066250b') AND content_tag.tag_id = tag.id AND (tag.origin_id like 'tag-%' or tag.origin_id like 'category-%') AND tag.origin_type = 'wordpress' D "tag_id"=>"0cc37c4e-c6a2-44f3-8233-1fa863377693","church_slug"=>"apollos_demo","content_item_id"=>"07720437-38b2-4149-864d-7fd8f9271cfa"
content_tag INSERT INTO content_tag (content_item_id, created_at, tag_id, updated_at) VALUES ('a00d3445-b2bb-448a-96e2-45f4eedb4e7e','2024-05-16T19:15:05.786422+00:00'::timestamptz,'6fb789e3-7323-4706-8f3c-219f05223ab5','2024-05-16T19:15:05.786422+00:00'::timestamptz) ON CONFLICT (tag_id, content_item_id) DO UPDATE SET created_at = excluded.created_at, updated_at = excluded.updated_at I "tag_id"=>"6fb789e3-7323-4706-8f3c-219f05223ab5","church_slug"=>"apollos_demo","content_item_id"=>"a00d3445-b2bb-448a-96e2-45f4eedb4e7e"
content_tag INSERT INTO content_tag (content_item_id, created_at, tag_id, updated_at) VALUES ('a00d3445-b2bb-448a-96e2-45f4eedb4e7e','2024-05-16T19:15:05.786422+00:00'::timestamptz,'1472d0a5-c4eb-4497-9c9e-dda774b0166f','2024-05-16T19:15:05.786422+00:00'::timestamptz) ON CONFLICT (tag_id, content_item_id) DO UPDATE SET created_at = excluded.created_at, updated_at = excluded.updated_at I "tag_id"=>"1472d0a5-c4eb-4497-9c9e-dda774b0166f","church_slug"=>"apollos_demo","content_item_id"=>"a00d3445-b2bb-448a-96e2-45f4eedb4e7e"
content_tag INSERT INTO content_tag (content_item_id, created_at, tag_id, updated_at) VALUES ('07720437-38b2-4149-864d-7fd8f9271cfa','2024-05-16T19:15:05.786422+00:00'::timestamptz,'6fb789e3-7323-4706-8f3c-219f05223ab5','2024-05-16T19:15:05.786422+00:00'::timestamptz) ON CONFLICT (tag_id, content_item_id) DO UPDATE SET created_at = excluded.created_at, updated_at = excluded.updated_at I "tag_id"=>"6fb789e3-7323-4706-8f3c-219f05223ab5","church_slug"=>"apollos_demo","content_item_id"=>"07720437-38b2-4149-864d-7fd8f9271cfa"
content_tag INSERT INTO content_tag (content_item_id, created_at, tag_id, updated_at) VALUES ('07720437-38b2-4149-864d-7fd8f9271cfa','2024-05-16T19:15:05.786422+00:00'::timestamptz,'0cc37c4e-c6a2-44f3-8233-1fa863377693','2024-05-16T19:15:05.786422+00:00'::timestamptz) ON CONFLICT (tag_id, content_item_id) DO UPDATE SET created_at = excluded.created_at, updated_at = excluded.updated_at I "tag_id"=>"0cc37c4e-c6a2-44f3-8233-1fa863377693","church_slug"=>"apollos_demo","content_item_id"=>"07720437-38b2-4149-864d-7fd8f9271cfa"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment