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.
46 lines
1.3 KiB
46 lines
1.3 KiB
<?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('files', function (Blueprint $table) {
|
|
$table->uuid('uuid')->primary();
|
|
$table->string("original_name")->nullable();
|
|
$table->string("ext");
|
|
$table->string("mimetype");
|
|
$table->string("server_path");
|
|
$table->bigInteger("width")->nullable();
|
|
$table->bigInteger("height")->nullable();
|
|
$table->bigInteger("file_size")->nullable();
|
|
$table->bigInteger("sort")->nullable();
|
|
$table->json("alts")->nullable();
|
|
$table->string("description")->nullable();
|
|
$table->unsignedBigInteger("user_id")->nullable();
|
|
$table->string("ip")->nullable();
|
|
$table->unsignedBigInteger("collection_id")->nullable();
|
|
$table->timestamp("published_at")->nullable();
|
|
$table->timestamps();
|
|
$table->softDeletes();
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Reverse the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function down()
|
|
{
|
|
Schema::dropIfExists('files');
|
|
}
|
|
};
|