database And dertory update

This commit is contained in:
2021-03-08 13:01:01 +01:00
parent 858b065a8e
commit 4eb443cd1c
15 changed files with 59 additions and 13 deletions
+13
View File
@@ -0,0 +1,13 @@
<?php
require_once "../../bootstrap.php";
use Illuminate\Database\Capsule\Manager as Capsule;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
Capsule::schema()->create("admin_users", function (Blueprint $table){
$table->id();
$table->string("user_name");
$table->string("password");
$table->timestamps();
});
+4 -2
View File
@@ -8,8 +8,10 @@ use Illuminate\Support\Facades\Schema;
//Create game_data table with the rows as id, gameLink, isWebBased and timestamp
Capsule::schema()->create("game_data", function (Blueprint $table){
$table->id();
$table->string("gameLink");
$table->boolean("isWebBased");
$table->string('game_name');
$table->string("game_link");
$table->boolean("is_web_based");
$table->text("description")->nullable();
$table->string("img")->nullable();
$table->timestamps();
});
+3 -3
View File
@@ -9,9 +9,9 @@ use Illuminate\Support\Facades\Schema;
Capsule::schema()->create("game_jams", function (Blueprint $table){
$table->id();
$table->string("name");
$table->dateTime("startTime");
$table->dateTime("endTime");
$table->string("keyWord")->nullable();
$table->dateTime("start_time");
$table->dateTime("end_time");
$table->string("key_word")->nullable();
$table->text("description")->nullable();
$table->timestamps();
});
+2 -2
View File
@@ -8,8 +8,8 @@ use Illuminate\Support\Facades\Schema;
//Create groups table with the rows as id, groupName, groupAmount, fkGameJam, votes, fkPassword, fkGameData and timestamp
Capsule::schema()->create("groups", function (Blueprint $table){
$table->id();
$table->string("groupName");
$table->integer("groupAmount");
$table->string("group_name");
$table->integer("group_amount");
$table->foreignId("game_jam_id")->constrained("game_jams");
$table->foreignId("game_data_id")->nullable()->constrained("game_data");
$table->timestamps();
+1 -1
View File
@@ -8,7 +8,7 @@ use Illuminate\Support\Facades\Schema;
//Create key_words table with the rows as id, keyWord, fkGroup and timestamp
Capsule::schema()->create("key_words", function (Blueprint $table){
$table->id();
$table->string('keyWord');
$table->string('key_word');
$table->foreignId("group_id")->constrained("groups");
$table->timestamps();
});
+1
View File
@@ -19,3 +19,4 @@ require "Group.php"; //Group has foreign keys to the GameJam, GameData and Passw
require "Password.php"; //Password has no foreign key
require "KeyWord.php"; //Group has foreign keys to the Group
require "Vote.php";
require "AdminUser.php";