add migration filemarhun

This commit is contained in:
Amir
2022-09-04 09:50:30 +08:00
parent 27f20fe54e
commit 996665a3ee
5 changed files with 85 additions and 13 deletions
@@ -0,0 +1,37 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
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()->nullable();
$table->unsignedBigInteger('lelongbidmarhun_id')->unsigned()->nullable();
$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');
}
}