dalenguyen / firestore-import-export

An application that can help you to backup and restore from Cloud Firestore | Firebase
https://www.npmjs.com/package/firestore-export-import
401 stars 109 forks source link

There are two Timestamp fields in documents and importing the collection only handling first field. #28

Closed Subroid closed 4 years ago

Subroid commented 4 years ago

I have tried providing date arguments twice in command lines for both fields. But it's only properly handling the first field "product_adding_timestamp"

The commands I tried : node import.js firestore-export.json date=product_adding_timestamp, product_updating_timestamp node import.js firestore-export.json date=product_adding_timestamp, product_updating_timestamp

Here's the snippet of JSON data for both fields :

"product_adding_timestamp": {
                "_seconds": 1570476289,
                "_nanoseconds": 16000000
            }
 "product_updating_timestamp": {
                "_seconds": 1570476289,
                "_nanoseconds": 16000000
            }
Subroid commented 4 years ago

I have figured it out. I had to include both fields separating by a comma without space : node import.js firestore-export.json date=product_updating_timestamp,product_adding_timestamp

dalenguyen commented 4 years ago

@subrud yes, otherwise it will become another parameter.