Skip to content

Instantly share code, notes, and snippets.

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

40c40
< 4f77714a-8a4d-47da-900e-2232ade300b1 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
---
> 4f77714a-8a4d-47da-900e-2232ade300b1 Campbell 2301 Jacksboro Pike Suite 3 \N LaFollette TN 37766 36.34487 -84.161683 \N \N Campus 5 ministry_platform \N \N f 2fee0577-fd6c-44da-b1af-1b51383f590c apollos_demo campus
45c45
< 6939a97e-d566-4bdd-9e7d-1b3737ae70ee Friends \N \N \N \N Campus 2 ministry_platform \N \N f \N apollos_demo campus
---
> 6939a97e-d566-4bdd-9e7d-1b3737ae70ee Friends \N \N \N \N Campus 2 ministry_platform \N \N f 2fee0577-fd6c-44da-b1af-1b51383f590c apollos_demo campus
56c56
< fd0d72a5-6d3c-49d9-939c-f37a64b0c95b UT \N \N \N \N Campus 4 ministry_platform \N \N f \N apollos_demo campus
---
> fd0d72a5-6d3c-49d9-939c-f37a64b0c95b UT \N \N \N \N Campus 4 ministry_platform \N \N f 2fee0577-fd6c-44da-b1af-1b51383f590c apollos_demo campus
1451c1451
< IMAGE https://groups-production.s3.amazonaws.com/uploads/group/header_image/defaults/3.png fa92a2ab-553e-454f-9ca2-b989c84d8152 Community https://groups-production.s3.amazonaws.com/uploads/group/header_image/defaults/3.png planning_center 16af3040-5da4-4356-b8aa-cb055352a370 ImageMedia \N \N {} apollos_demo media
---
> IMAGE https://groups-production.s3.amazonaws.com/uploads/group/header_image/defaults/3.png fa92a2ab-553e-454f-9ca2-b989c84d8152 Community https://groups-production.s3.amazonaws.com/uploads/group/header_image/defaults/3.png planning_center 16af3040-5da4-4356-b8aa-cb055352a370 ImageMedia \N \N {"width": 1280, "height": 720} apollos_demo media
1869c1869
< IMAGE https://rock.apollos.app/GetImage.ashx?guid=4e181881-b156-48b0-be40-54af2b14b3fb 3c5ef9a4-7af9-48ab-9ad1-9218c57862ed Campus campusimage-71 rock 2fee0577-fd6c-44da-b1af-1b51383f590c IMAGE \N \N {"width": 183, "height": 183} apollos_demo media
---
> IMAGE https://rock.apollos.app/GetImage.ashx?guid=4e181881-b156-48b0-be40-54af2b14b3fb 4f77714a-8a4d-47da-900e-2232ade300b1 Campus campusimage-71 rock 2fee0577-fd6c-44da-b1af-1b51383f590c IMAGE \N \N {"width": 183, "height": 183} apollos_demo media
table_name changed_fields client_query action row_data
media "node_id"=>"63ca5c34-9198-4a7c-bcc3-4e197b3acd09" INSERT INTO media (apollos_type, created_at, updated_at, node_id, node_type, type, url, origin_id, origin_type) VALUES ('IMAGE','2024-05-19T20:02:09.992992+00:00'::timestamptz,'2024-05-19T20:02:09.992992+00:00'::timestamptz,'63ca5c34-9198-4a7c-bcc3-4e197b3acd09','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"=>"2fee0577-fd6c-44da-b1af-1b51383f590c","url"=>"https://rock.apollos.app/GetImage.ashx?guid=4e181881-b156-48b0-be40-54af2b14b3fb","type"=>"IMAGE","node_id"=>"3c5ef9a4-7af9-48ab-9ad1-9218c57862ed","metadata"=>"{\"width\": 183, \"height\": 183}","node_type"=>"Campus","origin_id"=>"campusimage-71","apollos_id"=>"IMAGE:2fee0577-fd6c-44da-b1af-1b51383f590c","church_slug"=>"apollos_demo","origin_type"=>"rock","apollos_type"=>"IMAGE"
media "node_id"=>"6939a97e-d566-4bdd-9e7d-1b3737ae70ee" INSERT INTO media (apollos_type, created_at, updated_at, node_id, node_type, type, url, origin_id, origin_type) VALUES ('IMAGE','2024-05-19T20:02:09.992992+00:00'::timestamptz,'2024-05-19T20:02:09.992992+00:00'::timestamptz,'6939a97e-d566-4bdd-9e7d-1b3737ae70ee','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"=>"2fee0577-fd6c-44da-b1af-1b51383f590c","url"=>"https://rock.apollos.app/GetImage.ashx?guid=4e181881-b156-48b0-be40-54af2b14b3fb","type"=>"IMAGE","node_id"=>"63ca5c34-9198-4a7c-bcc3-4e197b3acd09","metadata"=>"{\"width\": 183, \"height\": 183}","node_type"=>"Campus","origin_id"=>"campusimage-71","apollos_id"=>"IMAGE:2fee0577-fd6c-44da-b1af-1b51383f590c","church_slug"=>"apollos_demo","origin_type"=>"rock","apollos_type"=>"IMAGE"
media "node_id"=>"fd0d72a5-6d3c-49d9-939c-f37a64b0c95b" INSERT INTO media (apollos_type, created_at, updated_at, node_id, node_type, type, url, origin_id, origin_type) VALUES ('IMAGE','2024-05-19T20:02:09.992992+00:00'::timestamptz,'2024-05-19T20:02:09.992992+00:00'::timestamptz,'fd0d72a5-6d3c-49d9-939c-f37a64b0c95b','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"=>"2fee0577-fd6c-44da-b1af-1b51383f590c","url"=>"https://rock.apollos.app/GetImage.ashx?guid=4e181881-b156-48b0-be40-54af2b14b3fb","type"=>"IMAGE","node_id"=>"6939a97e-d566-4bdd-9e7d-1b3737ae70ee","metadata"=>"{\"width\": 183, \"height\": 183}","node_type"=>"Campus","origin_id"=>"campusimage-71","apollos_id"=>"IMAGE:2fee0577-fd6c-44da-b1af-1b51383f590c","church_slug"=>"apollos_demo","origin_type"=>"rock","apollos_type"=>"IMAGE"
media "node_id"=>"4f77714a-8a4d-47da-900e-2232ade300b1" INSERT INTO media (apollos_type, created_at, updated_at, node_id, node_type, type, url, origin_id, origin_type) VALUES ('IMAGE','2024-05-19T20:02:09.992992+00:00'::timestamptz,'2024-05-19T20:02:09.992992+00:00'::timestamptz,'4f77714a-8a4d-47da-900e-2232ade300b1','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"=>"2fee0577-fd6c-44da-b1af-1b51383f590c","url"=>"https://rock.apollos.app/GetImage.ashx?guid=4e181881-b156-48b0-be40-54af2b14b3fb","type"=>"IMAGE","node_id"=>"fd0d72a5-6d3c-49d9-939c-f37a64b0c95b","metadata"=>"{\"width\": 183, \"height\": 183}","node_type"=>"Campus","origin_id"=>"campusimage-71","apollos_id"=>"IMAGE:2fee0577-fd6c-44da-b1af-1b51383f590c","church_slug"=>"apollos_demo","origin_type"=>"rock","apollos_type"=>"IMAGE"
campus "image_id"=>"2fee0577-fd6c-44da-b1af-1b51383f590c" UPDATE campus SET image_id = media.id FROM media WHERE campus.id = '6939a97e-d566-4bdd-9e7d-1b3737ae70ee' AND media.origin_id = 'campusimage-71' U "id"=>"6939a97e-d566-4bdd-9e7d-1b3737ae70ee","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:6939a97e-d566-4bdd-9e7d-1b3737ae70ee","church_slug"=>"apollos_demo","origin_type"=>"ministry_platform","postal_code"=>"","apollos_type"=>"Campus"
campus "image_id"=>"2fee0577-fd6c-44da-b1af-1b51383f590c" UPDATE campus SET image_id = media.id FROM media WHERE campus.id = 'fd0d72a5-6d3c-49d9-939c-f37a64b0c95b' AND media.origin_id = 'campusimage-71' U "id"=>"fd0d72a5-6d3c-49d9-939c-f37a64b0c95b","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:fd0d72a5-6d3c-49d9-939c-f37a64b0c95b","church_slug"=>"apollos_demo","origin_type"=>"ministry_platform","postal_code"=>"","apollos_type"=>"Campus"
campus "image_id"=>"2fee0577-fd6c-44da-b1af-1b51383f590c" UPDATE campus SET image_id = media.id FROM media WHERE campus.id = '4f77714a-8a4d-47da-900e-2232ade300b1' AND media.origin_id = 'campusimage-71' U "id"=>"4f77714a-8a4d-47da-900e-2232ade300b1","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:4f77714a-8a4d-47da-900e-2232ade300b1","church_slug"=>"apollos_demo","origin_type"=>"ministry_platform","postal_code"=>"37766","apollos_type"=>"Campus"
node_slug "node_id"=>"0b894ae0-f8d5-470a-99a4-f580e5fa1398" INSERT INTO node_slug (created_at, updated_at, slug, node_type, node_id) SELECT '2024-05-19 20:02:28.038235+00:00', '2024-05-19 20:02:28.038235+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"=>"9c1c2cd0-857b-4e90-98cc-c63f03de4019","slug"=>"giving","node_id"=>"3b3a47d1-3d0b-40be-bdf4-97da094eccc8","node_type"=>"ContentItem","church_slug"=>"apollos_demo"
node_slug "node_id"=>"3b3a47d1-3d0b-40be-bdf4-97da094eccc8" INSERT INTO node_slug (created_at, updated_at, slug, node_type, node_id) SELECT '2024-05-19 20:02:28.038235+00:00', '2024-05-19 20:02:28.038235+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"=>"9c1c2cd0-857b-4e90-98cc-c63f03de4019","slug"=>"giving","node_id"=>"0b894ae0-f8d5-470a-99a4-f580e5fa1398","node_type"=>"ContentItem","church_slug"=>"apollos_demo"
node_slug "node_id"=>"e61156f3-c3cc-42ec-9d4c-03fb0505c01d" INSERT INTO node_slug (created_at, updated_at, slug, node_type, node_id) SELECT '2024-05-19 20:02:28.038235+00:00', '2024-05-19 20:02:28.038235+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"=>"a6a43087-0d5f-4aa2-9cfd-6c89a4a302f2","slug"=>"at-the-movies","node_id"=>"cd6f23a1-8fd8-4092-8804-04f9272e281e","node_type"=>"ContentItem","church_slug"=>"apollos_demo"
node_slug "node_id"=>"193703dd-66c8-4e01-93ab-851a13fdbc5c" INSERT INTO node_slug (created_at, updated_at, slug, node_type, node_id) SELECT '2024-05-19 20:02:28.038235+00:00', '2024-05-19 20:02:28.038235+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"=>"d3882c6a-75cf-47fc-bfcd-43e747ab7238","slug"=>"1x8","node_id"=>"5bda865d-5184-486f-890e-057257ad9e35","node_type"=>"ContentItem","church_slug"=>"apollos_demo"
node_slug "node_id"=>"6c646902-d1eb-404e-871f-cbe11e3a5088" INSERT INTO node_slug (created_at, updated_at, slug, node_type, node_id) SELECT '2024-05-19 20:02:28.038235+00:00', '2024-05-19 20:02:28.038235+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"=>"543db021-2f7b-4d1c-ac5d-3b4317a0b095","slug"=>"potential","node_id"=>"f516cf96-da57-427a-b67e-138e4337e901","node_type"=>"ContentItem","church_slug"=>"apollos_demo"
node_slug "node_id"=>"e1ba32c5-07e1-4f73-b286-0e72ebde34bb" INSERT INTO node_slug (created_at, updated_at, slug, node_type, node_id) SELECT '2024-05-19 20:02:28.038235+00:00', '2024-05-19 20:02:28.038235+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"=>"9682b134-a9a4-4df2-96e1-cda37117c64b","slug"=>"arrival","node_id"=>"bca3e517-c90a-4df7-8e75-4803fac0350d","node_type"=>"ContentItem","church_slug"=>"apollos_demo"
node_slug "node_id"=>"cd6f23a1-8fd8-4092-8804-04f9272e281e" INSERT INTO node_slug (created_at, updated_at, slug, node_type, node_id) SELECT '2024-05-19 20:02:28.038235+00:00', '2024-05-19 20:02:28.038235+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"=>"a6a43087-0d5f-4aa2-9cfd-6c89a4a302f2","slug"=>"at-the-movies","node_id"=>"e61156f3-c3cc-42ec-9d4c-03fb0505c01d","node_type"=>"ContentItem","church_slug"=>"apollos_demo"
node_slug "node_id"=>"5bda865d-5184-486f-890e-057257ad9e35" INSERT INTO node_slug (created_at, updated_at, slug, node_type, node_id) SELECT '2024-05-19 20:02:28.038235+00:00', '2024-05-19 20:02:28.038235+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"=>"d3882c6a-75cf-47fc-bfcd-43e747ab7238","slug"=>"1x8","node_id"=>"193703dd-66c8-4e01-93ab-851a13fdbc5c","node_type"=>"ContentItem","church_slug"=>"apollos_demo"
node_slug "node_id"=>"f516cf96-da57-427a-b67e-138e4337e901" INSERT INTO node_slug (created_at, updated_at, slug, node_type, node_id) SELECT '2024-05-19 20:02:28.038235+00:00', '2024-05-19 20:02:28.038235+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"=>"543db021-2f7b-4d1c-ac5d-3b4317a0b095","slug"=>"potential","node_id"=>"6c646902-d1eb-404e-871f-cbe11e3a5088","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"=>"e71f5ca1-40b2-49ec-86a1-274508f35f2d","event_id"=>"3cbebe9a-d773-4b9a-b0b1-9c34c3d793b6","church_slug"=>"apollos_demo"
node_slug "node_id"=>"bca3e517-c90a-4df7-8e75-4803fac0350d" INSERT INTO node_slug (created_at, updated_at, slug, node_type, node_id) SELECT '2024-05-19 20:02:28.038235+00:00', '2024-05-19 20:02:28.038235+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"=>"9682b134-a9a4-4df2-96e1-cda37117c64b","slug"=>"arrival","node_id"=>"e1ba32c5-07e1-4f73-b286-0e72ebde34bb","node_type"=>"ContentItem","church_slug"=>"apollos_demo"
content_tag DELETE FROM content_tag WHERE content_item_id = '3697f9aa-67e5-48e7-954d-b5c55d2bd6f9' AND tag_id IN ('b32e3aca-b884-43e2-a525-7a3a3c0001da', 'c264dbc1-9fb6-46f6-a990-2a640f9f2915', '08cc72dd-9345-4da7-a837-84d027ce37e1', '3697f32f-5183-404b-97f8-71af237c3a1d', '5e2f3522-cb81-45e2-a70d-7d82dcaea307', 'cf8d72e5-1036-4abc-9b9b-921afe98f7bc', 'dad3eed0-4f0d-46d5-a403-a82d46e52fe7') D "tag_id"=>"08cc72dd-9345-4da7-a837-84d027ce37e1","church_slug"=>"apollos_demo","content_item_id"=>"3697f9aa-67e5-48e7-954d-b5c55d2bd6f9"
content_tag INSERT INTO content_tag (tag_id, content_item_id, created_at, updated_at) VALUES ('08cc72dd-9345-4da7-a837-84d027ce37e1', '3697f9aa-67e5-48e7-954d-b5c55d2bd6f9', NOW(), NOW()) I "tag_id"=>"08cc72dd-9345-4da7-a837-84d027ce37e1","church_slug"=>"apollos_demo","content_item_id"=>"3697f9aa-67e5-48e7-954d-b5c55d2bd6f9"
media "metadata"=>"{\"width\": 1280, \"height\": 720}" UPDATE media SET metadata = metadata || '{"width": 1280,"height": 720}'::jsonb WHERE id = '16af3040-5da4-4356-b8aa-cb055352a370'::uuid U "id"=>"16af3040-5da4-4356-b8aa-cb055352a370","url"=>"https://groups-production.s3.amazonaws.com/uploads/group/header_image/defaults/3.png","type"=>"IMAGE","node_id"=>"fa92a2ab-553e-454f-9ca2-b989c84d8152","metadata"=>"{}","node_type"=>"Community","origin_id"=>"https://groups-production.s3.amazonaws.com/uploads/group/header_image/defaults/3.png","apollos_id"=>"ImageMedia:16af3040-5da4-4356-b8aa-cb055352a370","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-19T20:02:54.346043+00:00'::timestamptz,'2024-05-19T20:02:54.346043+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"=>"7c7b47a3-9f62-4956-a784-e355f3e19158","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:7c7b47a3-9f62-4956-a784-e355f3e19158","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-19T20:02:54.346043+00:00'::timestamptz,'2024-05-19T20:02:54.346043+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"=>"fc3defc3-deb0-48fb-b527-49f876771cd3","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:fc3defc3-deb0-48fb-b527-49f876771cd3","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-19T20:02:54.346043+00:00'::timestamptz,'2024-05-19T20:02:54.346043+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"=>"f2dd7ca0-46f6-408f-abc1-7d88ce2da4c3","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:f2dd7ca0-46f6-408f-abc1-7d88ce2da4c3","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"=>"4e1766a2-251f-4822-b725-40c9fb130afe","event_id"=>"cf44d06e-d7ac-4dd6-9573-98725d5e7d83","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"=>"e71f5ca1-40b2-49ec-86a1-274508f35f2d","event_id"=>"b828e52d-0e81-4c0f-9b53-7fad44a35079","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"=>"e71f5ca1-40b2-49ec-86a1-274508f35f2d","event_id"=>"cf44d06e-d7ac-4dd6-9573-98725d5e7d83","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"=>"8b075f2f-e681-4a39-8111-3e2ed8036222","event_id"=>"3cbebe9a-d773-4b9a-b0b1-9c34c3d793b6","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"=>"8b075f2f-e681-4a39-8111-3e2ed8036222","event_id"=>"b828e52d-0e81-4c0f-9b53-7fad44a35079","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"=>"8b075f2f-e681-4a39-8111-3e2ed8036222","event_id"=>"cf44d06e-d7ac-4dd6-9573-98725d5e7d83","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"=>"678466ed-a465-4d28-910a-4a712d59705f","event_id"=>"b828e52d-0e81-4c0f-9b53-7fad44a35079","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"=>"099502cc-afb7-4dc3-8727-bb5306e4c1be","event_id"=>"3cbebe9a-d773-4b9a-b0b1-9c34c3d793b6","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"=>"099502cc-afb7-4dc3-8727-bb5306e4c1be","event_id"=>"cf44d06e-d7ac-4dd6-9573-98725d5e7d83","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"=>"e71f5ca1-40b2-49ec-86a1-274508f35f2d","event_id"=>"3cbebe9a-d773-4b9a-b0b1-9c34c3d793b6","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"=>"099502cc-afb7-4dc3-8727-bb5306e4c1be","event_id"=>"3cbebe9a-d773-4b9a-b0b1-9c34c3d793b6","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"=>"8b075f2f-e681-4a39-8111-3e2ed8036222","event_id"=>"3cbebe9a-d773-4b9a-b0b1-9c34c3d793b6","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"=>"e71f5ca1-40b2-49ec-86a1-274508f35f2d","event_id"=>"cf44d06e-d7ac-4dd6-9573-98725d5e7d83","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"=>"099502cc-afb7-4dc3-8727-bb5306e4c1be","event_id"=>"cf44d06e-d7ac-4dd6-9573-98725d5e7d83","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"=>"4e1766a2-251f-4822-b725-40c9fb130afe","event_id"=>"cf44d06e-d7ac-4dd6-9573-98725d5e7d83","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"=>"8b075f2f-e681-4a39-8111-3e2ed8036222","event_id"=>"cf44d06e-d7ac-4dd6-9573-98725d5e7d83","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"=>"e71f5ca1-40b2-49ec-86a1-274508f35f2d","event_id"=>"b828e52d-0e81-4c0f-9b53-7fad44a35079","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"=>"8b075f2f-e681-4a39-8111-3e2ed8036222","event_id"=>"b828e52d-0e81-4c0f-9b53-7fad44a35079","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"=>"678466ed-a465-4d28-910a-4a712d59705f","event_id"=>"b828e52d-0e81-4c0f-9b53-7fad44a35079","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"=>"7c7b47a3-9f62-4956-a784-e355f3e19158","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:7c7b47a3-9f62-4956-a784-e355f3e19158","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 = 'f2dd7ca0-46f6-408f-abc1-7d88ce2da4c3'::uuid U "id"=>"f2dd7ca0-46f6-408f-abc1-7d88ce2da4c3","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:f2dd7ca0-46f6-408f-abc1-7d88ce2da4c3","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 = 'fc3defc3-deb0-48fb-b527-49f876771cd3'::uuid U "id"=>"fc3defc3-deb0-48fb-b527-49f876771cd3","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:fc3defc3-deb0-48fb-b527-49f876771cd3","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 ('08e1fab3-4397-4c3f-8d46-5d781b6fc7fc') 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"=>"aa7e22cd-503c-4865-b806-7b712a8bec85","church_slug"=>"apollos_demo","content_item_id"=>"08e1fab3-4397-4c3f-8d46-5d781b6fc7fc"
content_tag INSERT INTO content_tag (content_item_id, created_at, tag_id, updated_at) VALUES ('08e1fab3-4397-4c3f-8d46-5d781b6fc7fc','2024-05-19T20:03:18.922194+00:00'::timestamptz,'aa7e22cd-503c-4865-b806-7b712a8bec85','2024-05-19T20:03:18.922194+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"=>"aa7e22cd-503c-4865-b806-7b712a8bec85","church_slug"=>"apollos_demo","content_item_id"=>"08e1fab3-4397-4c3f-8d46-5d781b6fc7fc"
content_tag DELETE from content_tag USING tag WHERE content_tag.content_item_id in ('d0b03b22-657a-4aec-b296-50eb385ba1a4','3baba3ee-15c4-405a-b1b9-550941c5db33','5e4b71e3-2193-4c71-8b7f-fb8795a4af02','dc05c96d-9be2-4a0f-8f38-526cbfa7b893','936fed07-3a27-4f56-a507-73f02e02ae26') 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"=>"7dac78a7-5e06-4ddf-a615-6e00514a5580","church_slug"=>"apollos_demo","content_item_id"=>"d0b03b22-657a-4aec-b296-50eb385ba1a4"
content_tag DELETE from content_tag USING tag WHERE content_tag.content_item_id in ('d0b03b22-657a-4aec-b296-50eb385ba1a4','3baba3ee-15c4-405a-b1b9-550941c5db33','5e4b71e3-2193-4c71-8b7f-fb8795a4af02','dc05c96d-9be2-4a0f-8f38-526cbfa7b893','936fed07-3a27-4f56-a507-73f02e02ae26') 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"=>"7dac78a7-5e06-4ddf-a615-6e00514a5580","church_slug"=>"apollos_demo","content_item_id"=>"dc05c96d-9be2-4a0f-8f38-526cbfa7b893"
content_tag DELETE from content_tag USING tag WHERE content_tag.content_item_id in ('d0b03b22-657a-4aec-b296-50eb385ba1a4','3baba3ee-15c4-405a-b1b9-550941c5db33','5e4b71e3-2193-4c71-8b7f-fb8795a4af02','dc05c96d-9be2-4a0f-8f38-526cbfa7b893','936fed07-3a27-4f56-a507-73f02e02ae26') 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"=>"4174d12b-62c4-48c7-8208-3d952cf5dee1","church_slug"=>"apollos_demo","content_item_id"=>"d0b03b22-657a-4aec-b296-50eb385ba1a4"
content_tag DELETE from content_tag USING tag WHERE content_tag.content_item_id in ('d0b03b22-657a-4aec-b296-50eb385ba1a4','3baba3ee-15c4-405a-b1b9-550941c5db33','5e4b71e3-2193-4c71-8b7f-fb8795a4af02','dc05c96d-9be2-4a0f-8f38-526cbfa7b893','936fed07-3a27-4f56-a507-73f02e02ae26') 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"=>"8c730718-a1ca-4a76-a0cf-4aca1730da7e","church_slug"=>"apollos_demo","content_item_id"=>"dc05c96d-9be2-4a0f-8f38-526cbfa7b893"
content_tag INSERT INTO content_tag (content_item_id, created_at, tag_id, updated_at) VALUES ('d0b03b22-657a-4aec-b296-50eb385ba1a4','2024-05-19T20:03:18.922194+00:00'::timestamptz,'7dac78a7-5e06-4ddf-a615-6e00514a5580','2024-05-19T20:03:18.922194+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"=>"7dac78a7-5e06-4ddf-a615-6e00514a5580","church_slug"=>"apollos_demo","content_item_id"=>"d0b03b22-657a-4aec-b296-50eb385ba1a4"
content_tag INSERT INTO content_tag (content_item_id, created_at, tag_id, updated_at) VALUES ('d0b03b22-657a-4aec-b296-50eb385ba1a4','2024-05-19T20:03:18.922194+00:00'::timestamptz,'4174d12b-62c4-48c7-8208-3d952cf5dee1','2024-05-19T20:03:18.922194+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"=>"4174d12b-62c4-48c7-8208-3d952cf5dee1","church_slug"=>"apollos_demo","content_item_id"=>"d0b03b22-657a-4aec-b296-50eb385ba1a4"
content_tag INSERT INTO content_tag (content_item_id, created_at, tag_id, updated_at) VALUES ('dc05c96d-9be2-4a0f-8f38-526cbfa7b893','2024-05-19T20:03:18.922194+00:00'::timestamptz,'7dac78a7-5e06-4ddf-a615-6e00514a5580','2024-05-19T20:03:18.922194+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"=>"7dac78a7-5e06-4ddf-a615-6e00514a5580","church_slug"=>"apollos_demo","content_item_id"=>"dc05c96d-9be2-4a0f-8f38-526cbfa7b893"
content_tag INSERT INTO content_tag (content_item_id, created_at, tag_id, updated_at) VALUES ('dc05c96d-9be2-4a0f-8f38-526cbfa7b893','2024-05-19T20:03:18.922194+00:00'::timestamptz,'8c730718-a1ca-4a76-a0cf-4aca1730da7e','2024-05-19T20:03:18.922194+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"=>"8c730718-a1ca-4a76-a0cf-4aca1730da7e","church_slug"=>"apollos_demo","content_item_id"=>"dc05c96d-9be2-4a0f-8f38-526cbfa7b893"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment