for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
/**
* Migration auto-generated by Sequel Pro Laravel Export (1.5.0)
* @see https://github.com/cviebrock/sequel-pro-laravel-export
*/
class CreateDatastoreDatastoreTable extends Migration
{
* Run the migrations.
*
* @return void
public function up()
Schema::create('datastore_datastore', function (Blueprint $table) {
$table->bigIncrements('id');
$table->unsignedBigInteger('datastore_id')->nullable();
$table->unsignedBigInteger('datastore2_id')->nullable();
$table->unique(['datastore2_id', 'datastore_id']);
$table->index('datastore_id');
$table->index('datastore2_id');
$table->foreign('datastore_id')->references('id')->on('datastore')->onDelete('CASCADE')->onUpdate('RESTRICT');
$table->foreign('datastore2_id')->references('id')->on('datastore')->onDelete('CASCADE')->onUpdate('RESTRICT');
});
}
* Reverse the migrations.
public function down()
Schema::dropIfExists('datastore_datastore');