Added migration for projects table.

This commit is contained in:
Lukas Halbritter
2018-09-03 17:02:30 +02:00
parent f03e7511f2
commit acca76f814
2 changed files with 49 additions and 0 deletions
@@ -0,0 +1,39 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateProjectsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('projects', function (Blueprint $table) {
$table->increments('id');
// Name of the project
$table->string('name');
// Start and end date of the project
$table->date('start_date');
$table->date('end_date');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('projects');
}
}