Updated migrations for unique
Updated migrations for unique
This commit is contained in:
parent
57468e7a87
commit
f76aaf2e2a
|
@ -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();
|
||||
});
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue
Block a user