diff --git a/ghost/core/core/server/data/migrations/versions/5.83/2024-05-02-06-01-13-add-latest-event-timestamp-to-email.js b/ghost/core/core/server/data/migrations/versions/5.83/2024-05-02-06-01-13-add-latest-event-timestamp-to-email.js deleted file mode 100644 index 7db5ffb64b..0000000000 --- a/ghost/core/core/server/data/migrations/versions/5.83/2024-05-02-06-01-13-add-latest-event-timestamp-to-email.js +++ /dev/null @@ -1,7 +0,0 @@ -// For information on writing migrations, see https://www.notion.so/ghost/Database-migrations-eb5b78c435d741d2b34a582d57c24253 - -const {createAddColumnMigration} = require('../../utils'); - -module.exports = createAddColumnMigration('emails', 'latest_event_timestamp', { - type: 'dateTime', nullable: true -}); diff --git a/ghost/core/core/server/data/schema/schema.js b/ghost/core/core/server/data/schema/schema.js index aba5a711cc..21e0ed51f6 100644 --- a/ghost/core/core/server/data/schema/schema.js +++ b/ghost/core/core/server/data/schema/schema.js @@ -839,8 +839,7 @@ module.exports = { created_at: {type: 'dateTime', nullable: false}, created_by: {type: 'string', maxlength: 24, nullable: false}, updated_at: {type: 'dateTime', nullable: true}, - updated_by: {type: 'string', maxlength: 24, nullable: true}, - latest_event_timestamp: {type: 'dateTime', nullable: true} + updated_by: {type: 'string', maxlength: 24, nullable: true} }, email_batches: { id: {type: 'string', maxlength: 24, nullable: false, primary: true}, diff --git a/ghost/core/core/server/models/email.js b/ghost/core/core/server/models/email.js index 7cd8c28e64..61d188da7a 100644 --- a/ghost/core/core/server/models/email.js +++ b/ghost/core/core/server/models/email.js @@ -15,8 +15,7 @@ const Email = ghostBookshelf.Model.extend({ delivered_count: 0, opened_count: 0, failed_count: 0, - source_type: 'html', - latest_event_timestamp: null + source_type: 'html' }; }, diff --git a/ghost/core/test/e2e-api/admin/__snapshots__/activity-feed.test.js.snap b/ghost/core/test/e2e-api/admin/__snapshots__/activity-feed.test.js.snap index dedc16f76a..02842b5783 100644 --- a/ghost/core/test/e2e-api/admin/__snapshots__/activity-feed.test.js.snap +++ b/ghost/core/test/e2e-api/admin/__snapshots__/activity-feed.test.js.snap @@ -22699,7 +22699,7 @@ exports[`Activity Feed API Can filter events by post id 2: [headers] 1`] = ` Object { "access-control-allow-origin": "http://127.0.0.1:2369", "cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0", - "content-length": "17739", + "content-length": "17559", "content-type": "application/json; charset=utf-8", "content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/, "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, @@ -23852,7 +23852,7 @@ exports[`Activity Feed API Returns email delivered events in activity feed 2: [h Object { "access-control-allow-origin": "http://127.0.0.1:2369", "cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0", - "content-length": "1081", + "content-length": "1051", "content-type": "application/json; charset=utf-8", "content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/, "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, @@ -23886,7 +23886,7 @@ exports[`Activity Feed API Returns email opened events in activity feed 2: [head Object { "access-control-allow-origin": "http://127.0.0.1:2369", "cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0", - "content-length": "1078", + "content-length": "1048", "content-type": "application/json; charset=utf-8", "content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/, "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, @@ -23944,7 +23944,7 @@ exports[`Activity Feed API Returns email sent events in activity feed 2: [header Object { "access-control-allow-origin": "http://127.0.0.1:2369", "cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0", - "content-length": "3980", + "content-length": "3860", "content-type": "application/json; charset=utf-8", "content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/, "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, diff --git a/ghost/core/test/e2e-api/admin/__snapshots__/emails.test.js.snap b/ghost/core/test/e2e-api/admin/__snapshots__/emails.test.js.snap index 0a9b58a02a..c6f86209e5 100644 --- a/ghost/core/test/e2e-api/admin/__snapshots__/emails.test.js.snap +++ b/ghost/core/test/e2e-api/admin/__snapshots__/emails.test.js.snap @@ -499,7 +499,6 @@ Object { "from": null, "html": "
Look! I'm an email
", "id": StringMatching /\\[a-f0-9\\]\\{24\\}/, - "latest_event_timestamp": null, "newsletter_id": null, "opened_count": 1, "plaintext": "Waba-daba-dab-da", @@ -527,7 +526,6 @@ Object { "from": null, "html": "What's that? Another email!
", "id": StringMatching /\\[a-f0-9\\]\\{24\\}/, - "latest_event_timestamp": null, "newsletter_id": null, "opened_count": 0, "plaintext": "yes this is an email", @@ -562,7 +560,7 @@ exports[`Emails API Can browse emails 2: [headers] 1`] = ` Object { "access-control-allow-origin": "http://127.0.0.1:2369", "cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0", - "content-length": "1465", + "content-length": "1405", "content-type": "application/json; charset=utf-8", "content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/, "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, @@ -700,7 +698,6 @@ Object { "from": null, "html": "Look! I'm an email
", "id": StringMatching /\\[a-f0-9\\]\\{24\\}/, - "latest_event_timestamp": null, "newsletter_id": null, "opened_count": 1, "plaintext": "Waba-daba-dab-da", @@ -725,7 +722,7 @@ exports[`Emails API Can read an email 2: [headers] 1`] = ` Object { "access-control-allow-origin": "http://127.0.0.1:2369", "cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0", - "content-length": "672", + "content-length": "642", "content-type": "application/json; charset=utf-8", "content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/, "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, @@ -748,7 +745,6 @@ Object { "from": null, "html": "What's that? Another email!
", "id": StringMatching /\\[a-f0-9\\]\\{24\\}/, - "latest_event_timestamp": null, "newsletter_id": null, "opened_count": 0, "plaintext": "yes this is an email", @@ -773,7 +769,7 @@ exports[`Emails API Can retry a failed email 2: [headers] 1`] = ` Object { "access-control-allow-origin": "http://127.0.0.1:2369", "cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0", - "content-length": "718", + "content-length": "688", "content-type": "application/json; charset=utf-8", "content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/, "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, @@ -796,7 +792,6 @@ Object { "from": "support@example.com", "html": "Hey Jamie, Hey Jamie,
Unsubscribe", "id": StringMatching /\\[a-f0-9\\]\\{24\\}/, - "latest_event_timestamp": null, "newsletter_id": StringMatching /\\[a-f0-9\\]\\{24\\}/, "opened_count": 0, "plaintext": "Hey Jamie, Hey Jamie @@ -822,7 +817,7 @@ exports[`Emails API Does default replacements on the HTML body of an old email 2 Object { "access-control-allow-origin": "http://127.0.0.1:2369", "cache-control": "no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0", - "content-length": "953", + "content-length": "923", "content-type": "application/json; charset=utf-8", "content-version": StringMatching /v\\\\d\\+\\\\\\.\\\\d\\+/, "etag": StringMatching /\\(\\?:W\\\\/\\)\\?"\\(\\?:\\[ !#-\\\\x7E\\\\x80-\\\\xFF\\]\\*\\|\\\\r\\\\n\\[\\\\t \\]\\|\\\\\\\\\\.\\)\\*"/, diff --git a/ghost/core/test/e2e-api/admin/__snapshots__/members.test.js.snap b/ghost/core/test/e2e-api/admin/__snapshots__/members.test.js.snap index 2ca9ad2913..ab363e53ee 100644 --- a/ghost/core/test/e2e-api/admin/__snapshots__/members.test.js.snap +++ b/ghost/core/test/e2e-api/admin/__snapshots__/members.test.js.snap @@ -2932,68 +2932,6 @@ Object { } `; -exports[`Members API Can filter by conversion attribution 1: [body] 1`] = ` -Object { - "members": Array [ - Object { - "avatar_image": null, - "comped": false, - "created_at": StringMatching /\\\\d\\{4\\}-\\\\d\\{2\\}-\\\\d\\{2\\}T\\\\d\\{2\\}:\\\\d\\{2\\}:\\\\d\\{2\\}\\\\\\.000Z/, - "email": "member1@test.com", - "email_count": 0, - "email_open_rate": null, - "email_opened_count": 0, - "email_suppression": Object { - "info": null, - "suppressed": false, - }, - "geolocation": null, - "id": StringMatching /\\[a-f0-9\\]\\{24\\}/, - "labels": Any