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 [email protected]:therour/db-migrator.git
- you should add configuration to
config.php
or you may use.env
just 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:seed
Seed the database with recordsphp artisan db:wipe
Drop all tables, views, and types
-
make
php artisan make:migration
Create a new migration filephp artisan make:seeder
Create a new seeder class
-
migrate
php artisan migrate:fresh
Drop all tables and re-run all migrationsphp artisan migrate:install
Create the migration repositoryphp artisan migrate:refresh
Reset and re-run all migrationsphp artisan migrate:reset
Rollback all database migrationsphp artisan migrate:rollback
Rollback the last database migrationphp artisan migrate:status
Show the status of each migration