laravel 마이그레이션 변경 열 이름
Schema::table('users', function (Blueprint $table) {
$table->renameColumn('from', 'to');
});
laravel 마이그레이션 열 이름 변경
Schema::table('users', function (Blueprint $table) {
$table->renameColumn('from', 'to');
});
라라벨 마이그레이션 정수
$table->bigInteger('votes');
NU
$table->bigInteger('votes');
laravel rollback 마지막 마이그레이션
php artisan migrate:rollback --step=1
laravel 마이그레이션 변경 열 유형
public function up()
{
Schema::table('sometable', function (Blueprint $table) {
$table->text('text')->change();
});
}
마이그레이션 필수 필드 라라벨
$table->string('foo')->nullable(false)->change();
라라벨 롤백 마지막 마이그레이션
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
NU
php artisan make:migration add_votes_to_users_table --table=users
php artisan make:migration create_users_table --create=users