diff --git a/database/migrations/2022_02_03_035702_create_labels_table.php b/database/migrations/2022_02_03_035702_create_labels_table.php index 270318b..8facfc9 100644 --- a/database/migrations/2022_02_03_035702_create_labels_table.php +++ b/database/migrations/2022_02_03_035702_create_labels_table.php @@ -15,7 +15,7 @@ class CreateLabelsTable extends Migration { Schema::create('labels', function (Blueprint $table) { $table->char('id', 8)->primary()->default(null); - $table->string('label'); + $table->string('label')->unique(); $table->timestamps(); }); } diff --git a/database/migrations/2022_02_08_010323_create_labels_assigned_table.php b/database/migrations/2022_02_08_010323_create_labels_assigned_table.php index e0a4da8..fc33240 100644 --- a/database/migrations/2022_02_08_010323_create_labels_assigned_table.php +++ b/database/migrations/2022_02_08_010323_create_labels_assigned_table.php @@ -14,8 +14,8 @@ class CreateLabelsAssignedTable extends Migration public function up() { Schema::create('labels_assigned', function (Blueprint $table) { - $table->char('label_id', 8); - $table->char('service_id', 8); + $table->char('label_id', 8)->unique(); + $table->char('service_id', 8)->unique(); }); } diff --git a/database/migrations/2022_02_21_001233_create_ips_table.php b/database/migrations/2022_02_21_001233_create_ips_table.php index 5dac351..6b0e468 100644 --- a/database/migrations/2022_02_21_001233_create_ips_table.php +++ b/database/migrations/2022_02_21_001233_create_ips_table.php @@ -10,7 +10,7 @@ class CreateIPsTable extends Migration { Schema::create('ips', function (Blueprint $table) { $table->char('id', 8)->unique(); - $table->char('service_id', 8); + $table->char('service_id', 8)->unique(); $table->string('address'); $table->tinyInteger('is_ipv4')->default(1); $table->tinyInteger('active')->default(1);