40 lines
794 B
PHP
40 lines
794 B
PHP
<?php
|
|
|
|
use Illuminate\Database\Migrations\Migration;
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
use Illuminate\Support\Facades\Schema;
|
|
|
|
class EchomailExport extends Migration
|
|
{
|
|
/**
|
|
* Run the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function up()
|
|
{
|
|
Schema::create('address_echomail', function (Blueprint $table) {
|
|
|
|
$table->string('echomail_id');
|
|
|
|
$table->integer('address_id');
|
|
$table->foreign('address_id')->references('id')->on('addresses');
|
|
|
|
$table->datetime('export_date');
|
|
$table->datetime('sent_date')->nullable();
|
|
|
|
$table->unique(['address_id','echomail_id']);
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Reverse the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function down()
|
|
{
|
|
Schema::dropIfExists('address_echomail');
|
|
}
|
|
}
|