up()
up()
Run the migrations.
<?php
/**
* JingYao-backend
*
* @link https://gitee.com/wang-zhihui-release/jingyao-backend
* @apiDocument https://gitee.com/wang-zhihui-release/jingyao-backend/wikis/
*/
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class AddExtraNameToArticles extends Migration
{
/**
* Run the migrations.
*/
public function up()
{
Schema::table('articles', function (Blueprint $table) {
$table->string('extra_name')->nullable()->comment('附件名字');
});
}
/**
* Reverse the migrations.
*/
public function down()
{
Schema::table('articles', function (Blueprint $table) {
$table->dropColumn('extra_name');
});
}
}