javimanga/initdb

Package that helps with a series of commands to create, delete, and clone a database.

dev-master 2019-12-23 13:50 UTC

This package is auto-updated.

Last update: 2024-09-24 00:50:12 UTC


README

Package that helps with a series of commands to create, delete, and clone a database.

Install InitDB:

$ composer require javimanga/initdb

Add line to config/app.php:

JaviManga\InitDB\InitDBServiceProvider::class

Commands

Create database with name of .env, if you pass parameter {seed} it will also insert the seeders:

$ php artisan database:init {seed?}

Create database, if no parameter {name} is passed it will create the database from the .env file:

$ php artisan database:create {name?}

Delete database, if no parameter {name} is passed it will delete the database from the .env file:

$ php artisan database:drop {name?}

Clone the database of the .env file with the name of the parameter {new_name}:

$ php artisan database:clone {new_name?}