dootask/database/migrations/2023_03_07_152557_create_deleteds.php
2023-03-24 09:08:53 +08:00

38 lines
1.0 KiB
PHP
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateDeleteds extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('deleteds', function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('type', 50)->nullable()->default('')->comment('删除的数据类型project、task、dialog');
$table->bigInteger('did')->nullable()->default(0)->comment('删除的数据ID');
$table->bigInteger('userid')->nullable()->default(0)->comment('关系会员ID');
$table->timestamp('created_at')->nullable();
$table->unique(['type', 'did', 'userid']);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('deleted', function (Blueprint $table) {
//
});
}
}