You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

26 lines
536 B

<?php
use Movim\Migration;
use Illuminate\Database\Schema\Blueprint;
use App\Info;
class AddParentToInfosTable extends Migration
{
public function up()
{
Info::query()->delete();
$this->schema->table('infos', function (Blueprint $table) {
$table->string('parent')->nullable();
$table->index('parent');
});
}
public function down()
{
$this->schema->table('infos', function (Blueprint $table) {
$table->dropColumn('parent');
});
}
}