fix migrations

This commit is contained in:
mahdi purHosseini
2023-09-17 13:39:48 +03:30
parent b2fcd1ab69
commit 7a3fd3a13f
26 changed files with 1130 additions and 295 deletions
@@ -0,0 +1,36 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateUploadablesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('uploadables', function (Blueprint $table) {
$table->bigIncrements('id');
$table->unsignedBigInteger('uploadable_id');
$table->string('uploadable_type');
$table->unsignedBigInteger('gallery_id');
$table->foreign('gallery_id')->references('id')->on('galleries');
$table->string('image_role');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('uploadables');
}
}