01 2020
This commit is contained in:
parent
bed91c4f4a
commit
c8948338bb
122 changed files with 7911 additions and 1639 deletions
48
database/migrations/2020_01_29_151358_create_offer_table.php
Normal file
48
database/migrations/2020_01_29_151358_create_offer_table.php
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
<?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');
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue