Skip to content

Instantly share code, notes, and snippets.

@vinnyjth
Created May 16, 2024 19:08
Show Gist options
  • Save vinnyjth/caa2e2850ee52484d2bdd69dfa632532 to your computer and use it in GitHub Desktop.
Save vinnyjth/caa2e2850ee52484d2bdd69dfa632532 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.

30c30
< 0f87b7ab-6066-4fa6-aae8-433c15db9345 UT \N \N \N \N Campus 4 ministry_platform \N \N f \N apollos_demo campus
---
> 0f87b7ab-6066-4fa6-aae8-433c15db9345 UT \N \N \N \N Campus 4 ministry_platform \N \N f 5056b5ae-db5e-46e0-83ba-507472ed9e66 apollos_demo campus
47c47
< a73a2cc3-0c79-48be-a06a-be38f9522fd3 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
---
> a73a2cc3-0c79-48be-a06a-be38f9522fd3 Campbell 2301 Jacksboro Pike Suite 3 \N LaFollette TN 37766 36.34487 -84.161683 \N \N Campus 5 ministry_platform \N \N f 5056b5ae-db5e-46e0-83ba-507472ed9e66 apollos_demo campus
52c52
< de5cecef-a94b-452a-aee1-65644f5669dd Friends \N \N \N \N Campus 2 ministry_platform \N \N f \N apollos_demo campus
---
> de5cecef-a94b-452a-aee1-65644f5669dd Friends \N \N \N \N Campus 2 ministry_platform \N \N f 5056b5ae-db5e-46e0-83ba-507472ed9e66 apollos_demo campus
1451c1451
< IMAGE https://groups-production.s3.amazonaws.com/uploads/group/header_image/defaults/3.png 990f8a53-17bb-410c-8d49-d2801024c2bf Community https://groups-production.s3.amazonaws.com/uploads/group/header_image/defaults/3.png planning_center 6bfe2d0f-c46f-4c6c-bf95-30739ce550a7 ImageMedia \N \N {} apollos_demo media
---
> IMAGE https://groups-production.s3.amazonaws.com/uploads/group/header_image/defaults/3.png 990f8a53-17bb-410c-8d49-d2801024c2bf Community https://groups-production.s3.amazonaws.com/uploads/group/header_image/defaults/3.png planning_center 6bfe2d0f-c46f-4c6c-bf95-30739ce550a7 ImageMedia \N \N {"width": 1280, "height": 720} apollos_demo media
1869c1869
< IMAGE https://rock.apollos.app/GetImage.ashx?guid=4e181881-b156-48b0-be40-54af2b14b3fb 0140c05a-008d-4152-8908-6e404893ddee Campus campusimage-71 rock 5056b5ae-db5e-46e0-83ba-507472ed9e66 IMAGE \N \N {"width": 183, "height": 183} apollos_demo media
---
> IMAGE https://rock.apollos.app/GetImage.ashx?guid=4e181881-b156-48b0-be40-54af2b14b3fb a73a2cc3-0c79-48be-a06a-be38f9522fd3 Campus campusimage-71 rock 5056b5ae-db5e-46e0-83ba-507472ed9e66 IMAGE \N \N {"width": 183, "height": 183} apollos_demo media
table_name changed_fields client_query action row_data
media "metadata"=>"{\"width\": 1280, \"height\": 720}" UPDATE media SET metadata = metadata || '{"width": 1280,"height": 720}'::jsonb WHERE id = '6bfe2d0f-c46f-4c6c-bf95-30739ce550a7'::uuid U "id"=>"6bfe2d0f-c46f-4c6c-bf95-30739ce550a7","url"=>"https://groups-production.s3.amazonaws.com/uploads/group/header_image/defaults/3.png","type"=>"IMAGE","node_id"=>"990f8a53-17bb-410c-8d49-d2801024c2bf","metadata"=>"{}","node_type"=>"Community","origin_id"=>"https://groups-production.s3.amazonaws.com/uploads/group/header_image/defaults/3.png","apollos_id"=>"ImageMedia:6bfe2d0f-c46f-4c6c-bf95-30739ce550a7","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:06:24.123265+00:00'::timestamptz,'2024-05-16T19:06:24.123265+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"=>"bb0ef7e2-e877-4aca-a515-278b328254ef","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:bb0ef7e2-e877-4aca-a515-278b328254ef","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:06:24.123265+00:00'::timestamptz,'2024-05-16T19:06:24.123265+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"=>"e4cbfa35-57c2-4e5b-94b9-83f3888bd494","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:e4cbfa35-57c2-4e5b-94b9-83f3888bd494","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:06:24.123265+00:00'::timestamptz,'2024-05-16T19:06:24.123265+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"=>"d78589d1-814f-486d-b1e7-65e4a820cbc4","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:d78589d1-814f-486d-b1e7-65e4a820cbc4","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"=>"449c265e-cdd0-4c6a-8127-8c9214ff3948","event_id"=>"abb4ffe6-af8a-4e0a-bed5-b44349efa1dd","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"=>"0fcc28b2-3286-494c-8c09-c72f2cbb4bbd","event_id"=>"5fc59827-c508-4c51-a247-a2d0070c2e10","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"=>"0fcc28b2-3286-494c-8c09-c72f2cbb4bbd","event_id"=>"792cafd2-d115-4581-960c-faf231fdc35b","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"=>"0fcc28b2-3286-494c-8c09-c72f2cbb4bbd","event_id"=>"abb4ffe6-af8a-4e0a-bed5-b44349efa1dd","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"=>"50119ec0-4af6-45c6-9dca-d4e6e8545f8d","event_id"=>"5fc59827-c508-4c51-a247-a2d0070c2e10","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"=>"50119ec0-4af6-45c6-9dca-d4e6e8545f8d","event_id"=>"792cafd2-d115-4581-960c-faf231fdc35b","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"=>"50119ec0-4af6-45c6-9dca-d4e6e8545f8d","event_id"=>"abb4ffe6-af8a-4e0a-bed5-b44349efa1dd","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"=>"8aa93454-72ea-4181-8f85-d733e24256e7","event_id"=>"5fc59827-c508-4c51-a247-a2d0070c2e10","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"=>"225c7050-2908-4e89-9737-1d2d6e9f1b11","event_id"=>"792cafd2-d115-4581-960c-faf231fdc35b","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"=>"225c7050-2908-4e89-9737-1d2d6e9f1b11","event_id"=>"abb4ffe6-af8a-4e0a-bed5-b44349efa1dd","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"=>"0fcc28b2-3286-494c-8c09-c72f2cbb4bbd","event_id"=>"792cafd2-d115-4581-960c-faf231fdc35b","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"=>"225c7050-2908-4e89-9737-1d2d6e9f1b11","event_id"=>"792cafd2-d115-4581-960c-faf231fdc35b","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"=>"50119ec0-4af6-45c6-9dca-d4e6e8545f8d","event_id"=>"792cafd2-d115-4581-960c-faf231fdc35b","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"=>"0fcc28b2-3286-494c-8c09-c72f2cbb4bbd","event_id"=>"abb4ffe6-af8a-4e0a-bed5-b44349efa1dd","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"=>"225c7050-2908-4e89-9737-1d2d6e9f1b11","event_id"=>"abb4ffe6-af8a-4e0a-bed5-b44349efa1dd","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"=>"449c265e-cdd0-4c6a-8127-8c9214ff3948","event_id"=>"abb4ffe6-af8a-4e0a-bed5-b44349efa1dd","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"=>"50119ec0-4af6-45c6-9dca-d4e6e8545f8d","event_id"=>"abb4ffe6-af8a-4e0a-bed5-b44349efa1dd","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"=>"0fcc28b2-3286-494c-8c09-c72f2cbb4bbd","event_id"=>"5fc59827-c508-4c51-a247-a2d0070c2e10","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"=>"50119ec0-4af6-45c6-9dca-d4e6e8545f8d","event_id"=>"5fc59827-c508-4c51-a247-a2d0070c2e10","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"=>"8aa93454-72ea-4181-8f85-d733e24256e7","event_id"=>"5fc59827-c508-4c51-a247-a2d0070c2e10","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"=>"bb0ef7e2-e877-4aca-a515-278b328254ef","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:bb0ef7e2-e877-4aca-a515-278b328254ef","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 = 'd78589d1-814f-486d-b1e7-65e4a820cbc4'::uuid U "id"=>"d78589d1-814f-486d-b1e7-65e4a820cbc4","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:d78589d1-814f-486d-b1e7-65e4a820cbc4","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 = 'e4cbfa35-57c2-4e5b-94b9-83f3888bd494'::uuid U "id"=>"e4cbfa35-57c2-4e5b-94b9-83f3888bd494","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:e4cbfa35-57c2-4e5b-94b9-83f3888bd494","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 ('0a5824ff-337b-471f-be7b-db1d9b3b0726') 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"=>"baa30a1d-23ba-4cdc-9a73-64e9083959e6","church_slug"=>"apollos_demo","content_item_id"=>"0a5824ff-337b-471f-be7b-db1d9b3b0726"
content_tag INSERT INTO content_tag (content_item_id, created_at, tag_id, updated_at) VALUES ('0a5824ff-337b-471f-be7b-db1d9b3b0726','2024-05-16T19:06:53.303673+00:00'::timestamptz,'baa30a1d-23ba-4cdc-9a73-64e9083959e6','2024-05-16T19:06:53.303673+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"=>"baa30a1d-23ba-4cdc-9a73-64e9083959e6","church_slug"=>"apollos_demo","content_item_id"=>"0a5824ff-337b-471f-be7b-db1d9b3b0726"
content_tag DELETE from content_tag USING tag WHERE content_tag.content_item_id in ('4eb0e91d-1b2a-40a3-a02d-2883e5e74846','1231aeab-1d94-417a-82b4-b85bbec991d7','89d7cbea-3bf4-44b9-8418-cbf5445861e1','f1e8a785-6b85-48bc-aa2a-a7a9973e5ac6','2a08061f-5344-4534-90eb-513139d9275f') 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"=>"350620da-56f7-47a1-93d2-bcc880fc0d6c","church_slug"=>"apollos_demo","content_item_id"=>"4eb0e91d-1b2a-40a3-a02d-2883e5e74846"
content_tag DELETE from content_tag USING tag WHERE content_tag.content_item_id in ('4eb0e91d-1b2a-40a3-a02d-2883e5e74846','1231aeab-1d94-417a-82b4-b85bbec991d7','89d7cbea-3bf4-44b9-8418-cbf5445861e1','f1e8a785-6b85-48bc-aa2a-a7a9973e5ac6','2a08061f-5344-4534-90eb-513139d9275f') 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"=>"350620da-56f7-47a1-93d2-bcc880fc0d6c","church_slug"=>"apollos_demo","content_item_id"=>"f1e8a785-6b85-48bc-aa2a-a7a9973e5ac6"
content_tag DELETE from content_tag USING tag WHERE content_tag.content_item_id in ('4eb0e91d-1b2a-40a3-a02d-2883e5e74846','1231aeab-1d94-417a-82b4-b85bbec991d7','89d7cbea-3bf4-44b9-8418-cbf5445861e1','f1e8a785-6b85-48bc-aa2a-a7a9973e5ac6','2a08061f-5344-4534-90eb-513139d9275f') 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"=>"cf5601b3-4b68-4d35-a4a1-57edf78eb9d7","church_slug"=>"apollos_demo","content_item_id"=>"4eb0e91d-1b2a-40a3-a02d-2883e5e74846"
content_tag DELETE from content_tag USING tag WHERE content_tag.content_item_id in ('4eb0e91d-1b2a-40a3-a02d-2883e5e74846','1231aeab-1d94-417a-82b4-b85bbec991d7','89d7cbea-3bf4-44b9-8418-cbf5445861e1','f1e8a785-6b85-48bc-aa2a-a7a9973e5ac6','2a08061f-5344-4534-90eb-513139d9275f') 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"=>"480db66a-d243-4ea4-be68-c3a3e92fbc13","church_slug"=>"apollos_demo","content_item_id"=>"f1e8a785-6b85-48bc-aa2a-a7a9973e5ac6"
content_tag INSERT INTO content_tag (content_item_id, created_at, tag_id, updated_at) VALUES ('4eb0e91d-1b2a-40a3-a02d-2883e5e74846','2024-05-16T19:06:53.303673+00:00'::timestamptz,'350620da-56f7-47a1-93d2-bcc880fc0d6c','2024-05-16T19:06:53.303673+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"=>"350620da-56f7-47a1-93d2-bcc880fc0d6c","church_slug"=>"apollos_demo","content_item_id"=>"4eb0e91d-1b2a-40a3-a02d-2883e5e74846"
content_tag INSERT INTO content_tag (content_item_id, created_at, tag_id, updated_at) VALUES ('4eb0e91d-1b2a-40a3-a02d-2883e5e74846','2024-05-16T19:06:53.303673+00:00'::timestamptz,'cf5601b3-4b68-4d35-a4a1-57edf78eb9d7','2024-05-16T19:06:53.303673+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"=>"cf5601b3-4b68-4d35-a4a1-57edf78eb9d7","church_slug"=>"apollos_demo","content_item_id"=>"4eb0e91d-1b2a-40a3-a02d-2883e5e74846"
content_tag INSERT INTO content_tag (content_item_id, created_at, tag_id, updated_at) VALUES ('f1e8a785-6b85-48bc-aa2a-a7a9973e5ac6','2024-05-16T19:06:53.303673+00:00'::timestamptz,'350620da-56f7-47a1-93d2-bcc880fc0d6c','2024-05-16T19:06:53.303673+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"=>"350620da-56f7-47a1-93d2-bcc880fc0d6c","church_slug"=>"apollos_demo","content_item_id"=>"f1e8a785-6b85-48bc-aa2a-a7a9973e5ac6"
content_tag INSERT INTO content_tag (content_item_id, created_at, tag_id, updated_at) VALUES ('f1e8a785-6b85-48bc-aa2a-a7a9973e5ac6','2024-05-16T19:06:53.303673+00:00'::timestamptz,'480db66a-d243-4ea4-be68-c3a3e92fbc13','2024-05-16T19:06:53.303673+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"=>"480db66a-d243-4ea4-be68-c3a3e92fbc13","church_slug"=>"apollos_demo","content_item_id"=>"f1e8a785-6b85-48bc-aa2a-a7a9973e5ac6"
campus "image_id"=>"5056b5ae-db5e-46e0-83ba-507472ed9e66" UPDATE campus SET image_id = media.id FROM media WHERE campus.id = 'a73a2cc3-0c79-48be-a06a-be38f9522fd3' AND media.origin_id = 'campusimage-71' U "id"=>"a73a2cc3-0c79-48be-a06a-be38f9522fd3","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:a73a2cc3-0c79-48be-a06a-be38f9522fd3","church_slug"=>"apollos_demo","origin_type"=>"ministry_platform","postal_code"=>"37766","apollos_type"=>"Campus"
node_slug "node_id"=>"feac0f3d-5363-49b1-acaa-aca1bad0d2aa" INSERT INTO node_slug (created_at, updated_at, slug, node_type, node_id) SELECT '2024-05-16 19:05:51.010228+00:00', '2024-05-16 19:05:51.010228+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"=>"4618536b-4a51-4db1-8dab-fe56ef32f0f4","slug"=>"giving","node_id"=>"98fc3de0-ff28-4c32-9690-2323a8b49827","node_type"=>"ContentItem","church_slug"=>"apollos_demo"
node_slug "node_id"=>"98fc3de0-ff28-4c32-9690-2323a8b49827" INSERT INTO node_slug (created_at, updated_at, slug, node_type, node_id) SELECT '2024-05-16 19:05:51.010228+00:00', '2024-05-16 19:05:51.010228+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"=>"4618536b-4a51-4db1-8dab-fe56ef32f0f4","slug"=>"giving","node_id"=>"feac0f3d-5363-49b1-acaa-aca1bad0d2aa","node_type"=>"ContentItem","church_slug"=>"apollos_demo"
node_slug "node_id"=>"bc08ec7a-4ebc-4e44-a7f5-7dc412566cf1" INSERT INTO node_slug (created_at, updated_at, slug, node_type, node_id) SELECT '2024-05-16 19:05:51.010228+00:00', '2024-05-16 19:05:51.010228+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"=>"9e14fa0f-8520-4dda-84a3-7a89ba2dd602","slug"=>"at-the-movies","node_id"=>"5783f323-3ecd-4bb0-a1fd-1695c3025dfe","node_type"=>"ContentItem","church_slug"=>"apollos_demo"
node_slug "node_id"=>"aefec09e-505d-47e7-a355-01fa7fd27ea3" INSERT INTO node_slug (created_at, updated_at, slug, node_type, node_id) SELECT '2024-05-16 19:05:51.010228+00:00', '2024-05-16 19:05:51.010228+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"=>"de66d228-7615-48e7-96c6-ac5f21f5a66d","slug"=>"1x8","node_id"=>"0fdf8a06-456f-4788-b306-4939a663c219","node_type"=>"ContentItem","church_slug"=>"apollos_demo"
node_slug "node_id"=>"fc954688-4787-4035-b2e3-02a286e8e394" INSERT INTO node_slug (created_at, updated_at, slug, node_type, node_id) SELECT '2024-05-16 19:05:51.010228+00:00', '2024-05-16 19:05:51.010228+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"=>"c5613672-da41-468f-ae2f-76c2968ef0c7","slug"=>"potential","node_id"=>"b799d2c2-7c98-4793-b832-998af80ee2b1","node_type"=>"ContentItem","church_slug"=>"apollos_demo"
node_slug "node_id"=>"45d1b07f-d943-49b2-a7d2-6d1675bc7569" INSERT INTO node_slug (created_at, updated_at, slug, node_type, node_id) SELECT '2024-05-16 19:05:51.010228+00:00', '2024-05-16 19:05:51.010228+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"=>"95eb900c-c8a8-45fa-aefa-0e7cb0f64f2b","slug"=>"arrival","node_id"=>"b8552dda-504c-4383-864e-dad2cc71af08","node_type"=>"ContentItem","church_slug"=>"apollos_demo"
node_slug "node_id"=>"5783f323-3ecd-4bb0-a1fd-1695c3025dfe" INSERT INTO node_slug (created_at, updated_at, slug, node_type, node_id) SELECT '2024-05-16 19:05:51.010228+00:00', '2024-05-16 19:05:51.010228+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"=>"9e14fa0f-8520-4dda-84a3-7a89ba2dd602","slug"=>"at-the-movies","node_id"=>"bc08ec7a-4ebc-4e44-a7f5-7dc412566cf1","node_type"=>"ContentItem","church_slug"=>"apollos_demo"
node_slug "node_id"=>"0fdf8a06-456f-4788-b306-4939a663c219" INSERT INTO node_slug (created_at, updated_at, slug, node_type, node_id) SELECT '2024-05-16 19:05:51.010228+00:00', '2024-05-16 19:05:51.010228+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"=>"de66d228-7615-48e7-96c6-ac5f21f5a66d","slug"=>"1x8","node_id"=>"aefec09e-505d-47e7-a355-01fa7fd27ea3","node_type"=>"ContentItem","church_slug"=>"apollos_demo"
node_slug "node_id"=>"b799d2c2-7c98-4793-b832-998af80ee2b1" INSERT INTO node_slug (created_at, updated_at, slug, node_type, node_id) SELECT '2024-05-16 19:05:51.010228+00:00', '2024-05-16 19:05:51.010228+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"=>"c5613672-da41-468f-ae2f-76c2968ef0c7","slug"=>"potential","node_id"=>"fc954688-4787-4035-b2e3-02a286e8e394","node_type"=>"ContentItem","church_slug"=>"apollos_demo"
node_slug "node_id"=>"b8552dda-504c-4383-864e-dad2cc71af08" INSERT INTO node_slug (created_at, updated_at, slug, node_type, node_id) SELECT '2024-05-16 19:05:51.010228+00:00', '2024-05-16 19:05:51.010228+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"=>"95eb900c-c8a8-45fa-aefa-0e7cb0f64f2b","slug"=>"arrival","node_id"=>"45d1b07f-d943-49b2-a7d2-6d1675bc7569","node_type"=>"ContentItem","church_slug"=>"apollos_demo"
content_tag DELETE FROM content_tag WHERE content_item_id = '1183d48a-f8fd-42ba-ae5c-a07c08418da4' AND tag_id IN ('25079304-ff05-4665-9cb7-865ebcaf7afe', '3a1b54f5-f7e5-443a-a147-01d7c688da0f', '895fd035-cf1b-45ec-9663-93481d611e11', 'df6360d3-0654-4a25-82d0-daad78b1eeaf', 'c60d00fa-d37f-4242-a29f-5d8df46833ae', 'e3de0011-8836-47fd-9756-82ca373cc36a', 'fa4e7237-d667-42e5-a192-26f599b2d694') D "tag_id"=>"3a1b54f5-f7e5-443a-a147-01d7c688da0f","church_slug"=>"apollos_demo","content_item_id"=>"1183d48a-f8fd-42ba-ae5c-a07c08418da4"
content_tag INSERT INTO content_tag (tag_id, content_item_id, created_at, updated_at) VALUES ('3a1b54f5-f7e5-443a-a147-01d7c688da0f', '1183d48a-f8fd-42ba-ae5c-a07c08418da4', NOW(), NOW()) I "tag_id"=>"3a1b54f5-f7e5-443a-a147-01d7c688da0f","church_slug"=>"apollos_demo","content_item_id"=>"1183d48a-f8fd-42ba-ae5c-a07c08418da4"
media "node_id"=>"cd1d0bfd-31a9-4d1a-baa8-fa4bf345e893" INSERT INTO media (apollos_type, created_at, updated_at, node_id, node_type, type, url, origin_id, origin_type) VALUES ('IMAGE','2024-05-16T19:05:31.017555+00:00'::timestamptz,'2024-05-16T19:05:31.017555+00:00'::timestamptz,'cd1d0bfd-31a9-4d1a-baa8-fa4bf345e893','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"=>"5056b5ae-db5e-46e0-83ba-507472ed9e66","url"=>"https://rock.apollos.app/GetImage.ashx?guid=4e181881-b156-48b0-be40-54af2b14b3fb","type"=>"IMAGE","node_id"=>"0140c05a-008d-4152-8908-6e404893ddee","metadata"=>"{\"width\": 183, \"height\": 183}","node_type"=>"Campus","origin_id"=>"campusimage-71","apollos_id"=>"IMAGE:5056b5ae-db5e-46e0-83ba-507472ed9e66","church_slug"=>"apollos_demo","origin_type"=>"rock","apollos_type"=>"IMAGE"
media "node_id"=>"de5cecef-a94b-452a-aee1-65644f5669dd" INSERT INTO media (apollos_type, created_at, updated_at, node_id, node_type, type, url, origin_id, origin_type) VALUES ('IMAGE','2024-05-16T19:05:31.017555+00:00'::timestamptz,'2024-05-16T19:05:31.017555+00:00'::timestamptz,'de5cecef-a94b-452a-aee1-65644f5669dd','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"=>"5056b5ae-db5e-46e0-83ba-507472ed9e66","url"=>"https://rock.apollos.app/GetImage.ashx?guid=4e181881-b156-48b0-be40-54af2b14b3fb","type"=>"IMAGE","node_id"=>"cd1d0bfd-31a9-4d1a-baa8-fa4bf345e893","metadata"=>"{\"width\": 183, \"height\": 183}","node_type"=>"Campus","origin_id"=>"campusimage-71","apollos_id"=>"IMAGE:5056b5ae-db5e-46e0-83ba-507472ed9e66","church_slug"=>"apollos_demo","origin_type"=>"rock","apollos_type"=>"IMAGE"
media "node_id"=>"0f87b7ab-6066-4fa6-aae8-433c15db9345" INSERT INTO media (apollos_type, created_at, updated_at, node_id, node_type, type, url, origin_id, origin_type) VALUES ('IMAGE','2024-05-16T19:05:31.017555+00:00'::timestamptz,'2024-05-16T19:05:31.017555+00:00'::timestamptz,'0f87b7ab-6066-4fa6-aae8-433c15db9345','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"=>"5056b5ae-db5e-46e0-83ba-507472ed9e66","url"=>"https://rock.apollos.app/GetImage.ashx?guid=4e181881-b156-48b0-be40-54af2b14b3fb","type"=>"IMAGE","node_id"=>"de5cecef-a94b-452a-aee1-65644f5669dd","metadata"=>"{\"width\": 183, \"height\": 183}","node_type"=>"Campus","origin_id"=>"campusimage-71","apollos_id"=>"IMAGE:5056b5ae-db5e-46e0-83ba-507472ed9e66","church_slug"=>"apollos_demo","origin_type"=>"rock","apollos_type"=>"IMAGE"
media "node_id"=>"a73a2cc3-0c79-48be-a06a-be38f9522fd3" INSERT INTO media (apollos_type, created_at, updated_at, node_id, node_type, type, url, origin_id, origin_type) VALUES ('IMAGE','2024-05-16T19:05:31.017555+00:00'::timestamptz,'2024-05-16T19:05:31.017555+00:00'::timestamptz,'a73a2cc3-0c79-48be-a06a-be38f9522fd3','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"=>"5056b5ae-db5e-46e0-83ba-507472ed9e66","url"=>"https://rock.apollos.app/GetImage.ashx?guid=4e181881-b156-48b0-be40-54af2b14b3fb","type"=>"IMAGE","node_id"=>"0f87b7ab-6066-4fa6-aae8-433c15db9345","metadata"=>"{\"width\": 183, \"height\": 183}","node_type"=>"Campus","origin_id"=>"campusimage-71","apollos_id"=>"IMAGE:5056b5ae-db5e-46e0-83ba-507472ed9e66","church_slug"=>"apollos_demo","origin_type"=>"rock","apollos_type"=>"IMAGE"
campus "image_id"=>"5056b5ae-db5e-46e0-83ba-507472ed9e66" UPDATE campus SET image_id = media.id FROM media WHERE campus.id = 'de5cecef-a94b-452a-aee1-65644f5669dd' AND media.origin_id = 'campusimage-71' U "id"=>"de5cecef-a94b-452a-aee1-65644f5669dd","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:de5cecef-a94b-452a-aee1-65644f5669dd","church_slug"=>"apollos_demo","origin_type"=>"ministry_platform","postal_code"=>"","apollos_type"=>"Campus"
campus "image_id"=>"5056b5ae-db5e-46e0-83ba-507472ed9e66" UPDATE campus SET image_id = media.id FROM media WHERE campus.id = '0f87b7ab-6066-4fa6-aae8-433c15db9345' AND media.origin_id = 'campusimage-71' U "id"=>"0f87b7ab-6066-4fa6-aae8-433c15db9345","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:0f87b7ab-6066-4fa6-aae8-433c15db9345","church_slug"=>"apollos_demo","origin_type"=>"ministry_platform","postal_code"=>"","apollos_type"=>"Campus"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment