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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Subscriber migration fails when updating to 3.0 #11349

Closed
gargol opened this issue Nov 7, 2019 · 0 comments · Fixed by #11383
Labels

Comments

@gargol
Copy link
Contributor

@gargol gargol commented Nov 7, 2019

Issue Summary

When running Ghost instance on SQLite with more than 1000 subscribers it fails to migrate to members when updating to Ghost 3.0. First reported here: https://forum.ghost.org/t/ghost-3-0-migrating-subscribers-to-members-bug/10002/4

To Reproduce

  1. Create 1000 subscribers on Ghost 2.x instance running on SQLite
  2. Update to Ghost 3.0 by e.g.: ghost update 3.0
  3. Update fails and the logs point to failure in 12-populate-members-table-from-subscribers.js migration

The cause of the failure is the same one as in #11263.

A possible fix for this would be rewriting the migration insert statement - https://github.com/TryGhost/Ghost/blob/3.0.0/core/server/data/migrations/versions/3.0/12-populate-members-table-from-subscribers.js#L40

to an iterative approach rather than inserting everything all at once.

Technical details:

  • Ghost Version: 2.27.0
  • Node Version: 8
  • Browser/OS: Linux
  • Database: SQLite
gargol added a commit to gargol/Ghost that referenced this issue Nov 11, 2019
closes TryGhost#11349

- The main reason for failure was SQLite's 999 variable limit
- More details here TryGhost#11270
gargol added a commit that referenced this issue Nov 11, 2019
closes #11349

- The main reason for failure was SQLite's 999 variable limit
- More details here #11270
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.