Made documentation on migrations
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user