add foreign keys and extend models
This commit is contained in:
@ -16,6 +16,7 @@ return new class extends Migration
|
||||
$table->string('room_code');
|
||||
$table->string('timestamp_located_since');
|
||||
$table->string('device_id');
|
||||
$table->foreign('device_id')->references('device_id')->on('devices');
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -16,6 +16,7 @@ return new class extends Migration
|
||||
$table->string('rz_username');
|
||||
$table->string('timestamp_owner_since');
|
||||
$table->string('device_id');
|
||||
$table->foreign('device_id')->references('device_id')->on('devices');
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -18,7 +18,8 @@ return new class extends Migration
|
||||
$table->string('timestamp_purchase');
|
||||
$table->string('cost_centre');
|
||||
$table->string('seller')->nullable();
|
||||
$table->string('device_id')->unique();
|
||||
$table->string('device_id');
|
||||
$table->foreign('device_id')->references('device_id')->on('devices');
|
||||
});
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user