1
0
mirror of https://github.com/cp6/my-idlers.git synced 2024-11-16 23:42:32 +01:00

Updated migrations for unique

Updated migrations for unique
This commit is contained in:
cp6 2022-03-03 14:51:47 +11:00
parent 57468e7a87
commit f76aaf2e2a
3 changed files with 4 additions and 4 deletions

View File

@ -15,7 +15,7 @@ class CreateLabelsTable extends Migration
{ {
Schema::create('labels', function (Blueprint $table) { Schema::create('labels', function (Blueprint $table) {
$table->char('id', 8)->primary()->default(null); $table->char('id', 8)->primary()->default(null);
$table->string('label'); $table->string('label')->unique();
$table->timestamps(); $table->timestamps();
}); });
} }

View File

@ -14,8 +14,8 @@ class CreateLabelsAssignedTable extends Migration
public function up() public function up()
{ {
Schema::create('labels_assigned', function (Blueprint $table) { Schema::create('labels_assigned', function (Blueprint $table) {
$table->char('label_id', 8); $table->char('label_id', 8)->unique();
$table->char('service_id', 8); $table->char('service_id', 8)->unique();
}); });
} }

View File

@ -10,7 +10,7 @@ class CreateIPsTable extends Migration
{ {
Schema::create('ips', function (Blueprint $table) { Schema::create('ips', function (Blueprint $table) {
$table->char('id', 8)->unique(); $table->char('id', 8)->unique();
$table->char('service_id', 8); $table->char('service_id', 8)->unique();
$table->string('address'); $table->string('address');
$table->tinyInteger('is_ipv4')->default(1); $table->tinyInteger('is_ipv4')->default(1);
$table->tinyInteger('active')->default(1); $table->tinyInteger('active')->default(1);