e29a5891c8
Reviewed-on: #5 Co-authored-by: ISMAIL MASSERAN <ismail@koppkb.com> Co-committed-by: ISMAIL MASSERAN <ismail@koppkb.com>
40 lines
1.0 KiB
PHP
40 lines
1.0 KiB
PHP
<?php
|
|
|
|
use Illuminate\Database\Migrations\Migration;
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
use Illuminate\Support\Facades\DB;
|
|
use Illuminate\Support\Facades\Schema;
|
|
|
|
class CreateFilemarhunTable extends Migration
|
|
{
|
|
/**
|
|
* Run the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function up()
|
|
{
|
|
Schema::create('filemarhun', function (Blueprint $table) {
|
|
$table->bigIncrements('id');
|
|
$table->unsignedBigInteger('lelongbid_id')->unsigned();
|
|
$table->unsignedBigInteger('lelongbidmarhun_id')->unsigned()->nullable();
|
|
$table->unsignedBigInteger('photo_type')->unsigned();
|
|
$table->string('file_type');
|
|
$table->timestamps();
|
|
});
|
|
|
|
// once the table is created use a raw query to ALTER it and add the MEDIUMBLOB
|
|
DB::statement('ALTER TABLE filemarhun ADD filename LONGBLOB');
|
|
}
|
|
|
|
/**
|
|
* Reverse the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function down()
|
|
{
|
|
Schema::dropIfExists('filemarhun');
|
|
}
|
|
}
|