nudj / nudj-backend

Nudj - Backend (Archive)
0 stars 0 forks source link

Please reset contact list for Alice Tester account #20

Closed richardbuckle closed 8 years ago

richardbuckle commented 8 years ago

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.

shtukas commented 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.

richardbuckle commented 8 years ago

Since the user ID is the primary key, won't just changing it break referential integrity elsewhere in the database?

shtukas commented 8 years ago

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.

shtukas commented 8 years ago

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...)

richardbuckle commented 8 years ago

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.

shtukas commented 8 years ago

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

richardbuckle commented 8 years ago

Yes, I just logged in as Alice and saw that in the debugger.

shtukas commented 8 years ago

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 ?

richardbuckle commented 8 years ago

OK

shtukas commented 8 years ago

update users set token=NULL

Let me know what happens...

richardbuckle commented 8 years ago

Unfortunately this causes the server to reject all login attempts for existing users. We'll have to revert.

shtukas commented 8 years ago

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.

richardbuckle commented 8 years ago

Thanks, it's working now.