laravel 마이그레이션 외래 키 5.6
Schema::table('posts', function (Blueprint $table) {
$table->unsignedInteger('user_id');
$table->foreign('user_id')->references('id')->on('users');
});
laravel 마이그레이션에서 열 추가
php artisan make:migration add_paid_to_users_table --table=users
기존 마이그레이션 laravel 을 변경하는 방법
php artisan make:migration update_user_guide_in_product_translations_table
라라벨 마이그레이션 생성
php artisan make:migration create_users_table
라라벨 롤백 마지막 마이그레이션
php artisan migrate:rollback --step=1
laravel 마이그레이션 만들기
php artisan make:migration add_votes_to_users_table --table=users
php artisan make:migration create_users_table --create=users