File: /home/xedaptot/be.naniguide.com/database/migrations/2021_03_12_023933_create_sources_table.php
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateSourcesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('sources', function (Blueprint $table) {
$table->increments('id');
$table->uuid('uid');
$table->string('type');
$table->integer('customer_id')->unsigned();
$table->longtext('meta')->nullable();
$table->timestamps();
$table->foreign('customer_id')->references('id')->on('customers')->onDelete('cascade');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('sources');
}
}