mikefunk / db-drop-tables
A laravel command to drop all mysql database tables
Installs: 1 163
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 0
Forks: 0
Open Issues: 0
pkg:composer/mikefunk/db-drop-tables
Requires (Dev)
- mockery/mockery: 0.9.*@dev
- orchestra/testbench: 2.2.*
This package is auto-updated.
Last update: 2025-10-15 11:50:07 UTC
README
In development, schema can be constantly changing. You don't want to have to add a migration file for every single column modification/addition/removal, do you? So just run this, then artisan migrate, then artisan db:seed. Or wrap those up in a phing command (or another artisan command) and do them in one shot.
Installation
- Install via composer:
composer require --dev mikefunk/db-drop-tables:dev-master - Add the service provider to your
app/config/app.phpin theprovidersarea:'MikeFunk\DbDropTables\DbDropTablesServiceProvider', - This will not work until you add a connection for the
mysql_information_schemadatabase inapp/config/database.php:
'mysql_information_schema' => array( 'driver' => 'mysql', 'host' => 'my_host_name' 'database' => 'INFORMATION_SCHEMA', 'username' => 'my_db_username' 'password' => 'my_db_password' ),
Usage
Call the command from within laravel with php artisan db:drop-tables. It will confirm that you want to drop all of your tables in your MySQL database. Want to skip the question and just do it? use --no-interaction or -n.