<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class FileUploadedTable extends Migration
{
	const TABLE = 'table_file_uploaded';

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
		Schema::create(static::TABLE, function (Blueprint $table) {

			$table->increments('id');
			$table->uuid('uuid')->unique();

			$table->string('filename')->nullable();
			$table->string('mime_type')->nullable();
			$table->string('size')->nullable();
			$table->string('ext')->nullable();
			$table->string('hash')->nullable();

			$table->string('local_folder')->nullable();
			$table->string('do_key')->nullable();
			$table->string('do_bucket')->nullable();

			$table->timestamps();
		});
	}

	/**
	 * Reverse the migrations.
	 *
	 * @return void
	 */
	public function down()
	{
		Schema::dropIfExists(static::TABLE);
	}
}
