48 lines
1.1 KiB
PHP
48 lines
1.1 KiB
PHP
<?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.4.1)
|
|
* @see https://github.com/cviebrock/sequel-pro-laravel-export
|
|
*/
|
|
class CreateOfferTable extends Migration
|
|
{
|
|
/**
|
|
* Run the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function up()
|
|
{
|
|
Schema::create('offer', function (Blueprint $table) {
|
|
$table->bigIncrements('id');
|
|
$table->bigInteger('lead_id');
|
|
$table->decimal('total', 10, 2)->default(0.00);
|
|
// $table->UNKNOWN:longblob('binary_data');
|
|
$table->dateTime('created_at');
|
|
$table->dateTime('updated_at');
|
|
|
|
$table->index('lead_id', 'offer_lead_id_idx');
|
|
|
|
$table->foreign('lead_id', 'offer_lead_id_lead_id')->references('id')->on('lead')->onDelete('CASCADE
|
|
')->onUpdate('RESTRICT');
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
/**
|
|
* Reverse the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function down()
|
|
{
|
|
Schema::dropIfExists('offer');
|
|
}
|
|
}
|