Hello,
I have the following business case :
- When I have a new customer I create a staging environment connecting to a staging database. People can iterate on custom settings
- When they are ready I want to import all datas they have produce on the staging database to the prod database
Staging and prod apps are the same with same Meteor Collections.
Simple example I have a Customer collection when I have a new customer I create a document on this collection I want to copy the document from the Customer Collection of my staging database to the Customer collection of my prod database.
I thought I could use RemoteCollectionDriver like this :
const RemoteCollection = function (name, connectionString, connectionOptions) {
return new Mongo.Collection(name, {
_driver: new MongoInternals.RemoteCollectionDriver(connectionString, connectionOptions),
});
};
and then
const CustomersStaging = RemoteCollection("Customers", "mongo_url_of_staging")
But I have an error Error: There is already a collection named "Customers"
Do you know how can I do that ?
Thanks