1
0
Fork 0
internet-everythings-agricu.../database/migrations/2023_03_21_104958_create_re...

42 lines
1.3 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<?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('regions', function (Blueprint $table) {
$table->id();
$table->string('name');
$table->string('cover')->nullable()->comment('封面图');
$table->string('director')->nullable()->comment('负责人');
$table->decimal('area')->default(0.00)->comment('面积');
$table->text('description')->nullable()->comment('描述');
$table->unsignedBigInteger('category_id')->nullable()->comment('分类');
$table->unsignedTinyInteger('is_recommend')->default(0)->comment('推荐开关');
$table->unsignedTinyInteger('is_enable')->default(1)->comment('显示开关');
$table->unsignedInteger('sort')->default(0)->comment('排序');
// $table->unsignedTinyInteger('status')->default(0)->comment('0未使用1种植中2维护中3已废弃');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('regions');
}
};