Complete of logging received and sent packet names, and display them in the web ui for each node

This commit is contained in:
2023-07-15 22:10:05 +10:00
parent 61ab0614b6
commit a3302b4012
14 changed files with 257 additions and 121 deletions

View File

@@ -11,53 +11,25 @@ return new class extends Migration
*/
public function up(): void
{
/*
Schema::create('system_transfers',function (Blueprint $table) {
$table->id();
$table->timestamps();
$table->string('packet')->nullable();
$table->bigInteger('file_id')->nullable();
$table->foreign('file_id')->references('id')->on('files');
$table->bigInteger('address_id');
$table->foreign('address_id')->references('id')->on('addresses');
$table->unique(['address_id','packet']);
$table->unique(['address_id','file_id']);
});
*/
Schema::table('netmails',function (Blueprint $table) {
$table->bigInteger('send_id')->nullable()->after('send_pkt');
$table->foreign('send_id')->references('id')->on('addresses');
$table->bigInteger('sent_id')->nullable()->after('sent_pkt');
$table->foreign('sent_id')->references('id')->on('addresses');
});
Schema::table('netmail_path',function (Blueprint $table) {
$table->string('recv_pkt')->nullable();
$table->bigInteger('recv_id')->nullable();
$table->bigInteger('recv_id')->nullable()->after('recv_pkt');
$table->foreign('recv_id')->references('id')->on('addresses');
$table->unique(['recv_id','netmail_id']);
});
DB::statement('ALTER TABLE echomail_seenby RENAME COLUMN packet TO sent_pkt');
Schema::table('echomail_seenby',function (Blueprint $table) {
$table->bigInteger('sent_id')->nullable();
$table->foreign('sent_id')->references('id')->on('addresses');
$table->unique(['sent_id','echomail_id']);
$table->dropColumn('mid');
});
Schema::table('echomail_path',function (Blueprint $table) {
$table->string('recv_pkt')->nullable();
$table->bigInteger('recv_id')->nullable();
$table->foreign('recv_id')->references('id')->on('addresses');
$table->unique(['recv_id','echomail_id']);
});
}
@@ -66,6 +38,6 @@ return new class extends Migration
*/
public function down(): void
{
//Schema::dropIfExists('system_transfers');
abort(500,'Cant go back');
}
};