Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃彈 Migrated subscribers data to members #11152

Merged
merged 4 commits into from
Sep 26, 2019

Conversation

naz
Copy link
Member

@naz naz commented Sep 24, 2019

subscribers be dead 馃拃 part uno

Heavily inspired (aka total rip-off) from 8ec12d9#diff-d8134e2685be7aa74ca7fda95443c6ef. As a follow up will be the removal of all subscriber related code (schema, app, flags, templates etc.)

Migration need 馃憖 on this. Thx!

common.logging.info(`Adding ${subscribers.length} entries to subscribers`);

let members = _.map(subscribers, (subscriber) => {
let member = memberAttrs.reduce(function (obj, entry) {
Copy link
Contributor

Choose a reason for hiding this comment

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

If we end up adding columns to the members table which don't exist in subscribers this is gonna break I think?

It might be best to be explicit about what we're copying here: name, email, created_{at,by} update_{at,by}

Copy link
Member Author

Choose a reason for hiding this comment

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

hm. good point. will update!

- If the members schema changes we don't want to copy over data without double checking it first
@naz naz requested a review from allouis September 25, 2019 09:18
Copy link
Contributor

@rishabhgrg rishabhgrg left a comment

Choose a reason for hiding this comment

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

Looks good 馃憤

@naz naz merged commit a562f09 into TryGhost:v3 Sep 26, 2019
naz added a commit that referenced this pull request Oct 9, 2019
refs #11152

- Added subscribers table drop migration
- Removed subscribers from schema
- Removed subscribers controllers/routes/regression tests
- Removed subscriber related API code
- Removed subscribers from internal apps
- Removed subscriber importer
- Removed subscriber model
- Removed subscriber related permissions
- Removed webhook code related to subscribers
- When upgrading to v3 it is on the site admin to migrate all zapps or any other webhook clients to use members
- Removed subscriber-specific translation
- Removed subscriber lab flag
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants