add migration filemarhun
This commit is contained in:
@@ -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');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user