Closed richardbuckle closed 8 years ago
I set her a new user id, without changing other details. I think this should do it. Let me know if you need anything else.
Since the user ID is the primary key, won't just changing it break referential integrity elsewhere in the database?
Yes, but it's never been a problem with this particular system. Also you said dev only. In prod I would stop worrying about Alice and just create a new test user.
Actually, I should be more precise. I am due to refresh dev with prod, so if prod is clean, the contamination that happened will be purged. That being said, now that I know that Apple IDs are messed up between dev and prod, I don't feel like refreshing the dev database ever again. I need to think about that.... (haven't had time last couple of days...)
Apple Push Notification Service (APNS) Tokens. (Apple IDs are also a defined term but are a different thing.)
Let me think about it too. My first thought would be to refresh dev from live but clear the table holding the APNS tokens. Apple document them as subject to frequent expiry anyway.
That would be the user table. Just to make suer we are talking about the same thing, the current value for Alice in (dev) is ACrKJOuh3Ig25FmBUGHCS1Ef7eQBNSb4rIN6U40VijbZiTcICSqBWBDGtlG8
Yes, I just logged in as Alice and saw that in the debugger.
Perfect. So here is what I want to do now. Make a dump of the dev database, and then delete that column, to see then what happens. If the system recovers then that's the step I will perform everytime I refresh from prod. If it lock itself in some weird state, I will just re-upload from the dump I saved.
Agree ?
OK
update users set token=NULL
Let me know what happens...
Unfortunately this causes the server to reject all login attempts for existing users. We'll have to revert.
Interesting. FYI (maybe you already know that) the column has been empty the whole time. Anyway, I have restored, the database using yesterday's snapshot.
Thanks, it's working now.
I made the mistake of logging into the Alice Tester account from my actual phone and it inhaled my contact list. Could you reset it please? Dev server only, production is unaffected.