2023-07-15 00:46:19 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
use Illuminate\Database\Migrations\Migration;
|
|
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
|
|
use Illuminate\Support\Facades\Schema;
|
|
|
|
|
|
|
|
return new class extends Migration
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Run the migrations.
|
|
|
|
*/
|
|
|
|
public function up(): void
|
|
|
|
{
|
|
|
|
Schema::table('netmails',function (Blueprint $table) {
|
2023-07-15 12:10:05 +00:00
|
|
|
$table->bigInteger('sent_id')->nullable()->after('sent_pkt');
|
|
|
|
$table->foreign('sent_id')->references('id')->on('addresses');
|
2023-07-15 00:46:19 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
Schema::table('netmail_path',function (Blueprint $table) {
|
|
|
|
$table->string('recv_pkt')->nullable();
|
2023-07-15 12:10:05 +00:00
|
|
|
$table->bigInteger('recv_id')->nullable()->after('recv_pkt');
|
2023-07-15 00:46:19 +00:00
|
|
|
$table->foreign('recv_id')->references('id')->on('addresses');
|
|
|
|
});
|
|
|
|
|
|
|
|
DB::statement('ALTER TABLE echomail_seenby RENAME COLUMN packet TO sent_pkt');
|
|
|
|
|
|
|
|
Schema::table('echomail_seenby',function (Blueprint $table) {
|
2023-07-15 12:10:05 +00:00
|
|
|
$table->dropColumn('mid');
|
2023-07-15 00:46:19 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
Schema::table('echomail_path',function (Blueprint $table) {
|
|
|
|
$table->string('recv_pkt')->nullable();
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Reverse the migrations.
|
|
|
|
*/
|
|
|
|
public function down(): void
|
|
|
|
{
|
2023-07-15 12:10:05 +00:00
|
|
|
abort(500,'Cant go back');
|
2023-07-15 00:46:19 +00:00
|
|
|
}
|
|
|
|
};
|