aboutsummaryrefslogtreecommitdiff
path: root/database/migrations/2020_10_18_142649_create_reservations_table.php
diff options
context:
space:
mode:
authorMateja <mail@matejamaric.com>2020-10-19 12:41:22 +0200
committerMateja <mail@matejamaric.com>2020-10-19 12:41:22 +0200
commit4f956151936eed1cf15d91e57b3148f235d03215 (patch)
treea1d6e303295dd7cb8f7ae3b271fdeaabe2d1932c /database/migrations/2020_10_18_142649_create_reservations_table.php
parent1f1cc4ae5facaac11a9e95dcc4cdfd3ae67dd788 (diff)
downloadyota-laravel-4f956151936eed1cf15d91e57b3148f235d03215.tar.gz
yota-laravel-4f956151936eed1cf15d91e57b3148f235d03215.zip
foreign key
Diffstat (limited to 'database/migrations/2020_10_18_142649_create_reservations_table.php')
-rw-r--r--database/migrations/2020_10_18_142649_create_reservations_table.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/database/migrations/2020_10_18_142649_create_reservations_table.php b/database/migrations/2020_10_18_142649_create_reservations_table.php
index c8b96f2..812d544 100644
--- a/database/migrations/2020_10_18_142649_create_reservations_table.php
+++ b/database/migrations/2020_10_18_142649_create_reservations_table.php
@@ -16,7 +16,7 @@ class CreateReservationsTable extends Migration
Schema::create('reservations', function (Blueprint $table) {
$table->id();
$table->boolean('approved')->default(false);
- $table->string('specialCall');
+ $table->unsignedBigInteger('specialCall')
$table->dateTime('fromTime');
$table->dateTime('toTime');
$table->string('frequencies', 255);
@@ -27,6 +27,7 @@ class CreateReservationsTable extends Migration
$table->string('operatorPhone', 50);
$table->integer('qso')->default(0);
$table->timestamps();
+ $table->foreign('specialCall')->references('id')->on('special_calls');
});
}