Added echoareas and fileareas
This commit is contained in:
97
database/migrations/2021_08_10_130352_echomail.php
Normal file
97
database/migrations/2021_08_10_130352_echomail.php
Normal file
@@ -0,0 +1,97 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class Echomail extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('echoareas', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
$table->string('name');
|
||||
$table->string('description');
|
||||
$table->boolean('active');
|
||||
$table->boolean('public');
|
||||
$table->string('notes')->nullable();
|
||||
|
||||
$table->integer('domain_id');
|
||||
$table->foreign('domain_id')->references('id')->on('domains');
|
||||
});
|
||||
|
||||
Schema::create('fileareas', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
$table->string('name');
|
||||
$table->string('description');
|
||||
$table->boolean('active');
|
||||
$table->boolean('public');
|
||||
$table->string('notes')->nullable();
|
||||
|
||||
$table->integer('domain_id');
|
||||
$table->foreign('domain_id')->references('id')->on('domains');
|
||||
});
|
||||
|
||||
Schema::create('address_echoarea', function (Blueprint $table) {
|
||||
$table->integer('echoarea_id');
|
||||
$table->foreign('echoarea_id')->references('id')->on('echoareas');
|
||||
|
||||
$table->integer('address_id');
|
||||
$table->foreign('address_id')->references('id')->on('addresses');
|
||||
|
||||
$table->dateTime('subscribed');
|
||||
});
|
||||
|
||||
Schema::create('address_filearea', function (Blueprint $table) {
|
||||
$table->integer('filearea_id');
|
||||
$table->foreign('filearea_id')->references('id')->on('fileareas');
|
||||
|
||||
$table->integer('address_id');
|
||||
$table->foreign('address_id')->references('id')->on('addresses');
|
||||
|
||||
$table->dateTime('subscribed');
|
||||
});
|
||||
|
||||
Schema::create('address_echomail', function (Blueprint $table) {
|
||||
$table->integer('echomail_id');
|
||||
$table->string('packet');
|
||||
|
||||
$table->integer('address_id');
|
||||
$table->foreign('address_id')->references('id')->on('addresses');
|
||||
});
|
||||
|
||||
Schema::create('address_file', function (Blueprint $table) {
|
||||
$table->integer('filearea_id');
|
||||
$table->boolean('sent');
|
||||
|
||||
$table->integer('address_id');
|
||||
$table->foreign('address_id')->references('id')->on('addresses');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('address_file');
|
||||
Schema::dropIfExists('address_echomail');
|
||||
|
||||
Schema::dropIfExists('address_filearea');
|
||||
Schema::dropIfExists('fileareas');
|
||||
|
||||
Schema::dropIfExists('address_echoarea');
|
||||
Schema::dropIfExists('echoareas');
|
||||
}
|
||||
}
|
@@ -78,5 +78,19 @@ class InitialSetupSeeder extends Seeder
|
||||
'active'=>TRUE,
|
||||
'password'=>'$2y$10$bJQDLfxnKrh6o5Sa02MZOukXcLTNQiByXSTJ7fTr.kHMpV2wxbG6.',
|
||||
]);
|
||||
|
||||
DB::table('echoareas')->insert([
|
||||
'name'=>'-BAD_AREA',
|
||||
'description'=>'Inbound invalid echomail',
|
||||
'active'=>TRUE,
|
||||
'domain_id'=>$do->id,
|
||||
]);
|
||||
|
||||
DB::table('fileareas')->insert([
|
||||
'name'=>'-BAD_AREA',
|
||||
'description'=>'Inbound invalid files',
|
||||
'active'=>TRUE,
|
||||
'domain_id'=>$do->id,
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user