How do I properly change / update my migration, I am using Laravel 5.1.
The Docs said that I should use change to update the column e.g.:
$table->string('color', 10)->change();
But where do I have to put it in the migration and what command do I have to use to update just a simply php artisan migrate?
I tried this so far:
public function up()
{
Schema::create('products', function (Blueprint $table)) {
$table->string('color', 5);
});
Schema::table('products', function (Blueprint $table)) {
$table->string('color', 10)->change();
});
}
And used this command:
php artisan migrate
But it did not change.
from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/1SLKmVo
via IFTTT
Aucun commentaire:
Enregistrer un commentaire