Download the PHP package redbastie/laravel-auto-migrate without Composer
On this page you can find all versions of the php package redbastie/laravel-auto-migrate. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download redbastie/laravel-auto-migrate
More information about redbastie/laravel-auto-migrate
Files in redbastie/laravel-auto-migrate
Package laravel-auto-migrate
Short Description Automatic migrations for your Laravel models.
License MIT
Homepage https://github.com/redbastie/laravel-auto-migrate
Informations about the package laravel-auto-migrate
NO LONGER MAINTAINED
This package is no longer maintained. Please consider my latest package here: https://github.com/redbastie/tailwire
Laravel Auto Migrate
Automatic migrations for your Laravel models.
Installation
Install via composer:
composer require redbastie/laravel-auto-migrate
How It Works
The migrate:auto
command will automatically diff your database and apply the necessary changes via Doctrine.
Usage
Specify a migration
method in your Laravel model:
class Vehicle extends Model
{
use HasFactory, FillsColumns;
public function migration(Blueprint $table)
{
$table->id();
$table->string('name');
$table->timestamps();
}
}
Run the migrate:auto
command:
php artisan migrate:auto --fresh --seed
Note that --fresh
and --seed
are optional.
Traditional Migrations
The migrate:auto
command will run your traditional migration files before the automatic migration methods.