Ghost 3.0 - Migrating subscribers to members - Bug

I’m trying to update my site to latest release, but I get this error:

SQLITE_ERROR: too many SQL variables
Help: Error occurred while executing the following migration: 12-populate-members-table-from-subscribers.js

Everything is up to date. Using latest cli.

Any ideas?

Sharing some progress on this, as I managed to get things working locally, but want to see if there will be a fix for production before I try and mess with my live site.

As the error mentions, I had a problem when it came to the migrating subscribers to members script. I’m not smart enough to understand why, but for reference, I had about 500.

As an attempt to fix this issue, I tried deleting all subscribers via a sqlite command (that made me very uncomfortable :anguished: )

Once the subscribers were deleted, I was able to run ‘ghost update’ with no problem at all.

I would prefer to not delete all my subscribers on my live site if I don’t have to. So curious if this is a production bug, a local development issue, or something else.

Thanks in advance.

Hey @andrewmc :wave: Could you be more specific about what version you are updating to is i 3.0.0 or 3.0.1(2) ? This bug has been fixed in 3.0.1, just making sure it’s not the same thing as before :)

Let me rephrase that… I ‘was’ using the latest :slight_smile:

Will give it a go with 3.0.1. Thanks for your help.

Unfortunately, that didn’t work again. I get exactly the same error when upgrading to 3.0.1.

On closer inspection, I think the bug fix you mention is for a different issue? My issue is with subscribers being converted to members. It’s not to do with posts. The file my bug hits is:

12-populate-members-table-from-subscribers.js

Just gave this a run and confirming it’s a similar bug we have run into with other migrations: when running Ghost instance on SQLite with more than 1000 subscribers it fails to migrate to members. Will file a bug for this and hopefully get a fix for the next release :crossed_fingers:

A very hacky workaround this issue would be:

  1. Exporting all of your members into CSV file
  2. Removing all subscriber records through UI or directly from subscribers table
  3. Running 3.0 update
  4. Reimporting members through CSV

:warning: make sure to back up all the data before attempting the above

Filed a bug here:

Amazing! Thanks for your help with this one @naz!

Will keep an eye on the ticket.