2022_03_22_105031_alter_immerse_table.php
899 Bytes
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class AlterImmerseTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('immerse', function (Blueprint $table) {
$table->string('poem_id')->after('size')->comment('一言id');
$table->string('temp_id')->after('poem_id')->comment('模板id');
$table->string('thumbnail')->after('temp_id')->nullable()->comment('封面图');
$table->string('bgm')->after('thumbnail')->nullable()->comment('背景音乐');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropColumns('immerse', ['poem_id', 'temp_id', 'thumbnail', 'bgm']);
}
}