2021_07_08_083446_create_toes_table.php
1 <?php 2 3 use Illuminate\Database\Migrations\Migration; 4 use Illuminate\Database\Schema\Blueprint; 5 use Illuminate\Support\Facades\Schema; 6 7 class CreateTOESTable extends Migration 8 { 9 /** 10 * Run the migrations. 11 * 12 * @return void 13 */ 14 public function up() 15 { 16 Schema::create('toes', function (Blueprint $table) { 17 $table->id(); 18 $table->boolean('is_active')->default(true); 19 $table->string('name'); 20 $table->string('evaluation_target'); 21 $table->string('evaluation_scope'); 22 $table->string('commercial_name'); 23 $table->json('sectorial_dimensions'); 24 $table->json('usage_dimension'); 25 $table->json('technological_dimensions'); 26 $table->string('cyber_security_info_url')->nullable(); //url of provider where cyber security information is listed 27 $table->string('guidance_url')->nullable(); //url of provider where guidance Secure is listed 28 $table->integer('period_security_support')->nullable(); // incomplete - need to add unit of measure 29 $table->string('provider_contact_vulnerability_url')->nullable(); //url of provider where contact for vulnerability is listed 30 $table->string('vulnerability_notifications')->nullable(); //email address or url of provider where vulnerability notifications are sent 31 $table->string('publicly_disclosed_url')->nullable(); //url of provider where publicly disclosed vulnerabilities are listed 32 33 $table->mediumText('description')->nullable(); 34 $table->foreignId('company_id')->nullable()->constrained('entities')->cascadeOnUpdate()->nullOnDelete(); 35 $table->foreignId('country_id')->nullable()->constrained('countries')->cascadeOnUpdate()->nullOnDelete(); 36 37 $table->string('version'); 38 $table->string('alias'); 39 $table->timestamp('created_at')->useCurrent(); 40 $table->timestamp('updated_at')->useCurrent()->useCurrentOnUpdate(); 41 42 $table->boolean('is_certified')->default(false); 43 44 $table->softDeletes(); 45 }); 46 } 47 48 /** 49 * Reverse the migrations. 50 * 51 * @return void 52 */ 53 public function down() 54 { 55 Schema::dropIfExists('toes'); 56 } 57 }