This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const admin = require('firebase-admin'); | |
const fs = require('fs'); | |
const serviceAccount = require('../../../../../../Private/myschool-data_transfer-key.json'); | |
admin.initializeApp({ credential: admin.credential.cert(serviceAccount) }); | |
const schema = require('./schema').schema; | |
const firestore2json = (db, schema, current) => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const admin = require('firebase-admin'); | |
var serviceAccount = require("./your-firestore-key.json"); | |
admin.initializeApp({ | |
credential: admin.credential.cert(serviceAccount) | |
}); | |
const dumped = {}; | |
const schema = { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const firebase = require('firebase-admin'); | |
var serviceAccountSource = require("./source.json"); // source DB key | |
var serviceAccountDestination = require("./destination.json"); // destiny DB key | |
const sourceAdmin = firebase.initializeApp({ | |
credential: firebase.credential.cert(serviceAccountSource) | |
}); | |
const destinyAdmin = firebase.initializeApp({ |