Skip to content

Duplicating MongoDB Data for Staging Environment in Laravel

License

Notifications You must be signed in to change notification settings

mh97m/laravel-database-fetcher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

Duplicating MongoDB Data for Staging Environment in Laravel

The goal is to create a Laravel command that:

Connects to the production and staging databases.

Clears the staging database to ensure a fresh start.

Copies collections and their documents from the production to the staging database.

Replicates indexes to maintain query performance.

Its create a new database named : env('DB_DATABASE').'_staging'

Installation

copy this command file to your project in this directory :

App\Console\Commands

Usage/Examples

php artisan database:fetch

Acknowledgements

About

Duplicating MongoDB Data for Staging Environment in Laravel

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages