php remeselník vykonať migráciu
php artisan make:migration create_users_table
migračný cudzí kľúč laravel 5.6
Schema::table('posts', function (Blueprint $table) {
$table->unsignedInteger('user_id');
$table->foreign('user_id')->references('id')->on('users');
});
vrátenie migrácie
php artisan migrate:rollback
migrácia Laravelu
php artisan make:migration create_users_table --create=users
php artisan make:migration add_votes_to_users_table --table=users
vytvorenie migrácie Laravelu
php artisan make:migration create_users_table
vytvorenie novej migrácie pomocou terminálu v laraveli
php artisan make:migration add_votes_to_users_table --table=users
php artisan make:migration create_users_table --create=users