FEATURE: add file size to uploaded files

This commit is contained in:
Michal Kváček
2016-02-08 14:50:44 +01:00
parent eb28696d82
commit e98032a3e1
2 changed files with 43 additions and 14 deletions
@@ -0,0 +1,33 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class AddFileSizeTofiles extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('files', function (Blueprint $table) {
$table->integer('file_size')
->after('mime_type')
->comment('Filesize given in bytes');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('files', function (Blueprint $table) {
$table->dropColumn('file_size');
});
}
}