Show netmails to admins, record netmail path in the DB
This commit is contained in:
45
database/migrations/2023_06_18_160504_netmailpath.php
Normal file
45
database/migrations/2023_06_18_160504_netmailpath.php
Normal file
@@ -0,0 +1,45 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('netmail_path', function (Blueprint $table) {
|
||||
$table->id();
|
||||
|
||||
$table->bigInteger('address_id');
|
||||
$table->foreign('address_id')->references('id')->on('addresses');
|
||||
|
||||
$table->unique(['id','netmail_id']);
|
||||
$table->unique(['netmail_id','address_id','parent_id']);
|
||||
|
||||
$table->bigInteger('parent_id')->nullable();
|
||||
$table->foreign(['parent_id','netmail_id'])->references(['id','netmail_id'])->on('netmail_path');
|
||||
|
||||
$table->bigInteger('netmail_id');
|
||||
$table->foreign('netmail_id')->references('id')->on('netmails');
|
||||
|
||||
$table->dateTime('datetime');
|
||||
$table->string('program');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('netmail_path');
|
||||
}
|
||||
};
|
Reference in New Issue
Block a user