mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-18 16:22:14 +00:00
implementation of user limits and refactoring
This commit is contained in:
49
database/migrations/2019_08_15_171345_create_files_table.php
Normal file
49
database/migrations/2019_08_15_171345_create_files_table.php
Normal file
@@ -0,0 +1,49 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class CreateFilesTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('files', function (Blueprint $table) {
|
||||
$table->uuid('id')->primary()->index();
|
||||
$table->uuid('user_id')->index();
|
||||
$table->uuid('parent_id')->nullable();
|
||||
|
||||
$table->text('name');
|
||||
$table->string('basename')->index();
|
||||
|
||||
$table->text('mimetype')->nullable();
|
||||
$table->text('filesize');
|
||||
|
||||
$table->text('type')->nullable();
|
||||
$table->longText('metadata')->nullable();
|
||||
|
||||
$table->enum('author', ['user', 'member', 'visitor'])->default('user');
|
||||
|
||||
$table->softDeletes();
|
||||
$table->timestamps();
|
||||
|
||||
$table->charset = 'utf8mb4';
|
||||
$table->collation = 'utf8mb4_unicode_ci';
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('files');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user