28 lines
846 B
PHP
28 lines
846 B
PHP
<?php
|
|
//require bootstrap aka our database connection
|
|
require_once "../../bootstrap.php";
|
|
use Illuminate\Database\Capsule\Manager as Capsule;
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
use Illuminate\Support\Facades\Schema;
|
|
|
|
//Create game_jams table with the rows as id, name, startTime, endTime, keyWord, description and timestamp
|
|
Capsule::schema()->create("game_jams", function (Blueprint $table){
|
|
$table->id();
|
|
$table->string("name");
|
|
$table->dateTime("startTime");
|
|
$table->dateTime("endTime");
|
|
$table->string("keyWord")->nullable();
|
|
$table->text("description")->nullable();
|
|
$table->timestamps();
|
|
});
|
|
|
|
/*
|
|
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;
|
|
*/ |