You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

42 lines
1.3 KiB

6 months ago
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateUploadsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('uploads', function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('belongs_type')->nullable();
$table->integer('belongs_id')->nullable();
$table->string('original_name')->nullable()->comment('原始文件名');
$table->string('folder')->nullable()->comment('存储目录');
$table->string('name')->nullable()->comment('存储文件名字');
$table->string('extension')->nullable()->comment('后缀名字');
$table->integer('size')->nullable()->comment('文件大小');
$table->string('creator_type')->nullable()->comment('创建用户组');
$table->integer('creator_id')->nullable()->comment('创建用户id');
$table->timestamps();
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('uploads');
}
}