mein-sterntours/database/migrations/2020_01_29_151358_create_offer_table.php
Kevin Adametz c8948338bb 01 2020
2020-02-14 10:18:20 +01:00

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');
}
}