Ekapp/skolehjem/database/migrations/2020_06_29_091545_create_ev...

38 lines
875 B
PHP
Raw Normal View History

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