Files
lelong/database/migrations/2022_08_30_125405_create_filemarhun_table.php
ismailmasseran e29a5891c8 Bugfix/list clickup issue (#5)
Reviewed-on: #5
Co-authored-by: ISMAIL MASSERAN <ismail@koppkb.com>
Co-committed-by: ISMAIL MASSERAN <ismail@koppkb.com>
2026-10-19 13:30:36 +08:00

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');
}
}