ufutx.dma/database/migrations/2024_01_31_095301_create_table_talk.php
2026-03-04 14:42:40 +08:00

36 lines
890 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::create('talk', function (Blueprint $table) {
$table->id();
$table->string('title')->comment('话题标题');
$table->text('images')->nullable()->comment('话题图片');
$table->tinyInteger('status')->default(0)->comment('话题状态 0:激活 1:关闭');
$table->tinyInteger('type')->default(0)->comment('类型 0:讨论 1:投票');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('talk');
}
};