2018_09_10_211623_create_projects_table.php 917 Bytes
Newer Older
beardedwarrior's avatar
beardedwarrior committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
<?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');
18 19 20 21 22 23
            $table->string('title');
            $table->string('payment_id')->nullable();
            $table->string('address')->nullable();
            $table->string('target_amount')->nullable();
            $table->string('state')->default('opened');
            $table->unsignedInteger('merge_request_id')->unique();
beardedwarrior's avatar
beardedwarrior committed
24 25 26 27 28 29 30 31 32 33 34 35 36 37
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('projects');
    }
}