node-firestore-backup-restore icon indicating copy to clipboard operation
node-firestore-backup-restore copied to clipboard

passes timestampsInSnapshots to Firestore.settings() to prevent warning

Open kitfit-dave opened this issue 6 years ago • 4 comments

Fixes willhlaw/node-firestore-backup-restore/issues/38

kitfit-dave avatar Nov 21 '18 11:11 kitfit-dave

Oh yeah, so, would have to actually support the Timestamp type as well (if there are any in the firestore that you want to backup and restore)

kitfit-dave avatar Nov 22 '18 13:11 kitfit-dave

This PR solves a bug where the timestamp type will always be the current date.

wata avatar Nov 26 '18 15:11 wata

Does it? Woohoo. :).

I don’t think Timestamp type is properly supported yet anyway, it doesn’t not get detected like other types (or the old date type), and is just treated like an object. It gets backed up, but I’ve not checked what it restores as (I don’t use any timestamps in any collections worth backing up).

kitfit-dave avatar Nov 26 '18 20:11 kitfit-dave

Thank you for your reply.

Yes, it is a bug that occurs when restore.

This creationDate will change to the current date on firestore.

backup.json

{
  "creationDate": {
    "type": "timestamp",
    "value": "2018-11-22T02:42:13.058Z"
  },
  "id": {
    "type": "string",
    "value": "Yy4vNitGnrCRJR849EWW"
  },
  ...

wata avatar Nov 27 '18 08:11 wata