Process of migrating state from one contract to another
- Move authentication service to register users in a new db
- Make changes in image-hash service
- Stop sync jobs
- Deploy new contract
- Run migration script
- Make change in cron jobs
- Start the jobs again
-
Take users from the old db and put them in Q1
-
Take a user from Q1
- Check that Instagram access token is valid
- Create a new record in the db with userId, accessToken and copyright
- Get user's all images
- Update last maxSyncedMaxId in the db
- Put all images in the Q2
-
Take image from Q2
- Calculate image hash
- Create a new record in the contract
- Update number of registered images
- Change db url to store newly registered users
- Change api of
/hash
to return binary hash of the image too
- Work with new db
- Change the format of state DTO