Laravel migration only, built for separate project in case you are not using laravel as main framework but love to using its database migration,t
you may run php artisan make:migration or php artisan migrate within this package.
- Just Download zip or
- clone the repository to create this migration project
git clone git@github.com:therour/db-migrator.git
- you should add configuration to
config.phpor you may use.envjust by creating the file.
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=test
DB_USERNAME=root
DB_PASSWORD=Create a migration file by running command
php artisan make:migration create_users_table
and then you can edit the migration file inside database folder.
NB: see the documentation by laravel
run php artisan list to show all available commands.
-
db
php artisan db:seedSeed the database with recordsphp artisan db:wipeDrop all tables, views, and types
-
make
php artisan make:migrationCreate a new migration filephp artisan make:seederCreate a new seeder class
-
migrate
php artisan migrate:freshDrop all tables and re-run all migrationsphp artisan migrate:installCreate the migration repositoryphp artisan migrate:refreshReset and re-run all migrationsphp artisan migrate:resetRollback all database migrationsphp artisan migrate:rollbackRollback the last database migrationphp artisan migrate:statusShow the status of each migration