Files
crater/database/migrations/2019_09_14_120124_create_media_table.php
Kiran Maniya 18a50315ba Removed json SQL datatype, Replaced with text
The JSON SQL datatype is not supported in some of SQL server(i.e. 5.6.44). Replaced it with text datatype.
2019-12-13 17:24:07 +05:30

39 lines
1.0 KiB
PHP

<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateMediaTable extends Migration
{
/**
* Run the migrations.
*/
public function up()
{
Schema::create('media', function (Blueprint $table) {
$table->bigIncrements('id');
$table->morphs('model');
$table->string('collection_name');
$table->string('name');
$table->string('file_name');
$table->string('mime_type')->nullable();
$table->string('disk');
$table->unsignedInteger('size');
$table->text('manipulations');
$table->text('custom_properties');
$table->text('responsive_images');
$table->unsignedInteger('order_column')->nullable();
$table->nullableTimestamps();
});
}
/**
* Reverse the migrations.
*/
public function down()
{
Schema::dropIfExists('media');
}
}