diff --git a/Backend/Database/GameData.php b/Backend/Database/GameData.php index f06f49e..e16e107 100644 --- a/Backend/Database/GameData.php +++ b/Backend/Database/GameData.php @@ -1,12 +1,24 @@ create("game_data", function (Blueprint $table){ $table->id(); $table->string("gameLink"); $table->boolean("isWebBased"); $table->timestamps(); -}); \ No newline at end of file +}); + +/* +Syntex to create table in database + +$table->string("texts"); + +$table => valuable; +string => datatype; +("texts") => name for the row in the database; +*/ \ No newline at end of file diff --git a/Backend/Database/GameJam.php b/Backend/Database/GameJam.php index e73b936..fa6138b 100644 --- a/Backend/Database/GameJam.php +++ b/Backend/Database/GameJam.php @@ -1,9 +1,11 @@ create("game_jams", function (Blueprint $table){ $table->id(); $table->string("name"); @@ -12,4 +14,15 @@ Capsule::schema()->create("game_jams", function (Blueprint $table){ $table->string("keyWord")->nullable(); $table->text("description")->nullable(); $table->timestamps(); -}); \ No newline at end of file +}); + +/* +Syntex to create table in database + +$table->string("texts"); + +$table => valuable; +string => datatype; +("texts") => name for the row in the database; +nullable => is allowed to not have a value in the database; +*/ \ No newline at end of file diff --git a/Backend/Database/Group.php b/Backend/Database/Group.php index 64e6b30..fdc744b 100644 --- a/Backend/Database/Group.php +++ b/Backend/Database/Group.php @@ -1,9 +1,11 @@ create("groups", function (Blueprint $table){ $table->id(); $table->string("groupName"); @@ -13,4 +15,18 @@ Capsule::schema()->create("groups", function (Blueprint $table){ $table->foreignId("fkPassword")->constrained("password"); $table->foreignId("fkGameData")->nullable()->constrained("game_data"); $table->timestamps(); -}); \ No newline at end of file +}); + + +/* +Syntex to create table in database + +$table->string("texts"); + +$table => valuable; +string => datatype; +("texts") => name for the row in the database; +nullable => is allowed to not have a value in the database; +foreignId => foreignId key row name in the database; +constrained => targeted table name; +*/ \ No newline at end of file diff --git a/Backend/Database/KeyWord.php b/Backend/Database/KeyWord.php index 47922de..1135436 100644 --- a/Backend/Database/KeyWord.php +++ b/Backend/Database/KeyWord.php @@ -1,12 +1,27 @@ create("key_words", function (Blueprint $table){ $table->id(); $table->string('keyWord'); $table->foreignId("fkGroup")->constrained("groups"); $table->timestamps(); -}); \ No newline at end of file +}); + + +/* +Syntex to create table in database + +$table->string("texts"); + +$table => valuable; +string => datatype; +("texts") => name for the row in the database +foreignId => foreignId key row name in the database; +constrained => targeted table name; +*/ \ No newline at end of file diff --git a/Backend/Database/Password.php b/Backend/Database/Password.php index 96bd49a..37f835f 100644 --- a/Backend/Database/Password.php +++ b/Backend/Database/Password.php @@ -1,12 +1,25 @@ create("password", function (Blueprint $table){ $table->id(); $table->string('password'); $table->rememberToken(); $table->timestamps(); -}); \ No newline at end of file +}); + + +/* +Syntex to create table in database + +$table->string("texts"); + +$table => valuable; +string => datatype; +("texts") => name for the row in the database +*/ \ No newline at end of file diff --git a/Backend/Database/databaseMigration.php b/Backend/Database/databaseMigration.php index db21355..3cc96f1 100644 --- a/Backend/Database/databaseMigration.php +++ b/Backend/Database/databaseMigration.php @@ -1,7 +1,20 @@ create("has_voted", function (Blueprint $table){ $table->id(); $table->timestamps(); -}); \ No newline at end of file +}); + + +/* +Syntex to create table in database + +$table->string("texts"); + +$table => valuable; +string => datatype; +("texts") => name for the row in the database +*/ \ No newline at end of file diff --git a/Backend/Main.php b/Backend/Main.php index f78891b..d268914 100644 --- a/Backend/Main.php +++ b/Backend/Main.php @@ -6,3 +6,5 @@ require "../bootstrap.php"; $gameJam = GameJam::firstOrCreate([ 'name' => "First game jam ever!", 'startTime' => "2021-03-03T12:40", 'endTime' => "2021-04-03T12:40", 'description' => "Det her et en beskrivelse" ]); + +