Made documentation on migrations

This commit is contained in:
neerholt
2021-03-04 09:19:13 +01:00
parent 2e6671bf7b
commit 119732114f
8 changed files with 108 additions and 11 deletions
+18 -5
View File
@@ -1,7 +1,20 @@
<?php
//Path /Backend/Database/databaseMigration.php
require "GameJam.php";
require "GameData.php";
require "Password.php";
require "Group.php";
require "KeyWord.php";
/*
* databaseMigration is used to auto crate the various tables in the database.
* To call/run the databaseMigration visited the "Path".
* There is a reason to why we call GameJam first, the reason being
* that GameJam doesn't have any foreign key in the table, we can't
* create a table that depends on a foreign key, so we create all the tables
* without a foreign key in it, after that we are able to create the tables
* with foreign keys in it.
*
* See the Database Diagram for detailed understand.
*/
require "GameJam.php"; //GameJam has no foreign key
require "GameData.php"; //GameData has no foreign key
require "Password.php"; //Password has no foreign key
require "Group.php"; //Group has foreign keys to the GameJam, GameData and Password tables hence we create it as one of the last tables in the database
require "KeyWord.php"; //Group has foreign keys to the Group