HSLdevcom / jore-map-ui

9 stars 2 forks source link

Refresh button to sync local database #1109

Open Divinare opened 5 years ago

Divinare commented 5 years ago

BE PR: https://github.com/HSLdevcom/jore-map-ui/issues/1109 FE PR: https://github.com/HSLdevcom/jore-map-ui/pull/1138

Easiest way to "partly solve" this issue would be to copy whole database as local db every night

Problem description: Now if you save something with old ui, those changes will not get copied to backend's local database and in new ui, you can't see those changes.

How to implement:

EDIT: this now only syncs rows that have been edited (not ones that have been inserted or deleted). To fix that, we should use SQL merge function, see #1141.

To test: 1) At stage stage env, edit some existing data 2) At dev env, try to fetch that data (shouldnt work) 3) Click that refresh button, operation takes aprox 9 minutes 4) After sync operation is complete, refresh page. You should see the data that was inserted at stage env

ahjyrkia commented 4 years ago

Works as intended. Post-merge reviewed