clrghouz/database/migrations/2021_08_22_110731_echomail_export.php
2021-09-08 22:07:19 +10:00

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