Game-Jaming/Backend/Database/Registration.php

17 lines
623 B
PHP

<?php
//require bootstrap aka our database connection
require_once realpath(dirname(__FILE__) . "/../../bootstrap.php");
use Illuminate\Database\Capsule\Manager as Capsule;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
Capsule::schema()->create("registrations", function (Blueprint $table) {
$table->id();
$table->foreignId("group_id")->constrained("groups");
$table->integer("group_amount");
$table->foreignId("game_jam_id")->constrained("game_jams");
$table->foreignId("game_data_id")->unique()->nullable()->constrained("game_data");
$table->timestamps();
});