2020-06-08 08:56:37 +00:00
|
|
|
<?php
|
2020-07-28 06:34:10 +00:00
|
|
|
//Migrations acts as a version control for the database allowing you to modify the app's database schema
|
2020-06-08 08:56:37 +00:00
|
|
|
|
2020-07-28 06:34:10 +00:00
|
|
|
//allows use of necessary libraries
|
2020-06-08 08:56:37 +00:00
|
|
|
use Illuminate\Database\Migrations\Migration;
|
|
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
|
|
use Illuminate\Support\Facades\Schema;
|
|
|
|
|
2020-06-08 12:59:25 +00:00
|
|
|
class CreateEvents extends Migration
|
2020-06-08 08:56:37 +00:00
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Run the migrations.
|
|
|
|
*
|
|
|
|
* @return void
|
|
|
|
*/
|
|
|
|
public function up()
|
|
|
|
{
|
2020-06-08 12:59:25 +00:00
|
|
|
Schema::create('events', function (Blueprint $table) {
|
2020-06-08 08:56:37 +00:00
|
|
|
$table->id();
|
2020-06-10 10:29:18 +00:00
|
|
|
$table->string("name");
|
2020-08-06 12:47:22 +00:00
|
|
|
$table->string("accountable");
|
2020-08-07 11:00:37 +00:00
|
|
|
$table->longText("description");
|
2020-06-29 10:54:43 +00:00
|
|
|
$table->dateTime("date");
|
2020-06-08 08:56:37 +00:00
|
|
|
$table->timestamps();
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Reverse the migrations.
|
|
|
|
*
|
|
|
|
* @return void
|
|
|
|
*/
|
|
|
|
public function down()
|
|
|
|
{
|
2020-06-08 12:59:25 +00:00
|
|
|
Schema::dropIfExists('events');
|
2020-06-08 08:56:37 +00:00
|
|
|
}
|
|
|
|
}
|