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.
44 lines
1.1 KiB
44 lines
1.1 KiB
<?php
|
|
|
|
use Illuminate\Database\Migrations\Migration;
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
use Illuminate\Support\Facades\Schema;
|
|
|
|
class CreateUploads extends Migration
|
|
{
|
|
/**
|
|
* Run the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function up()
|
|
{
|
|
|
|
|
|
Schema::create('uploads', function (Blueprint $table) {
|
|
$table->id();
|
|
$table->string("belongs_type")->nullable();
|
|
$table->integer("belongs_id")->nullable();
|
|
$table->string("original_name")->nullable();
|
|
$table->string("folder")->nullable();
|
|
$table->string("name")->nullable();
|
|
$table->string("extension")->nullable();
|
|
$table->integer("size")->nullable();
|
|
$table->string("creator_type")->nullable();
|
|
$table->integer("creator_id")->nullable();
|
|
$table->timestamps();
|
|
$table->softDeletes();
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Reverse the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function down()
|
|
{
|
|
Schema::dropIfExists('uploads');
|
|
}
|
|
}
|