mirror of
https://git.meshkee.com/cssd/cssd-back.git
synced 2026-10-10 20:01:07 +03:30
37 lines
885 B
PHP
37 lines
885 B
PHP
<?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');
|
|
}
|
|
}
|