File: /home/cursos.ril.es/database/migrations/2016_08_16_170750_add_slug_to_profesor.php
<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class AddSlugToProfesor extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('profesores', function (Blueprint $table) {
$table->string('slug')->unique();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('profesores', function (Blueprint $table) {
$table->dropColumn('slug');
});
}
}