35 lines
870 B
PHP
35 lines
870 B
PHP
|
|
<?php
|
|||
|
|
|
|||
|
|
use Illuminate\Database\Migrations\Migration;
|
|||
|
|
use Illuminate\Database\Schema\Blueprint;
|
|||
|
|
use Illuminate\Support\Facades\Schema;
|
|||
|
|
|
|||
|
|
return new class extends Migration
|
|||
|
|
{
|
|||
|
|
/**
|
|||
|
|
* Run the migrations.
|
|||
|
|
*
|
|||
|
|
* @return void
|
|||
|
|
*/
|
|||
|
|
public function up()
|
|||
|
|
{
|
|||
|
|
Schema::table('activity', function (Blueprint $table) {
|
|||
|
|
$table->tinyInteger('is_open_policy')->default(0)->comment('是否开启协议 0:关闭 1:开启')->after('address');
|
|||
|
|
$table->text('policy')->nullable()->comment('协议内容')->after('is_open_policy');
|
|||
|
|
});
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
/**
|
|||
|
|
* Reverse the migrations.
|
|||
|
|
*
|
|||
|
|
* @return void
|
|||
|
|
*/
|
|||
|
|
public function down()
|
|||
|
|
{
|
|||
|
|
Schema::table('activity', function (Blueprint $table) {
|
|||
|
|
$table->dropColumn('is_open_policy');
|
|||
|
|
$table->dropColumn('policy');
|
|||
|
|
});
|
|||
|
|
}
|
|||
|
|
};
|