Permission fixes and washing reservation fixes

This commit is contained in:
frederikpyt
2020-07-29 11:53:37 +02:00
parent fc0f97b04e
commit 569ace008a
11 changed files with 73 additions and 127 deletions
@@ -19,8 +19,11 @@ class CreateWashingReservations extends Migration
$table->id();
$table->timestamp("time");
$table->timestamps();
$table->unsignedBigInteger('machine');
$table->foreign("machine")->references('id')->on('washing_machines');
$table->unsignedBigInteger('machine_id');
$table->foreign("machine_id")->references('id')->on('washing_machines');
$table->unsignedBigInteger('user_id');
$table->foreign("user_id")->references('id')->on('users');
$table->unique(['time', 'machine_id']);
});
}