Files
lsky-pro/database/migrations/2021_12_11_184521_create_strategies_table.php
2022-01-20 20:41:55 +08:00

40 lines
963 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('strategies', function (Blueprint $table) {
$table->engine = 'InnoDB';
$table->charset = 'utf8mb4';
$table->collation = 'utf8mb4_unicode_ci';
$table->id();
$table->unsignedTinyInteger('key');
$table->string('name', 64)->comment('策略名称');
$table->string('intro', 255)->default('')->comment('简介');
$table->json('configs')->comment('策略配置');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('strategies');
}
};