2018_09_10_211623_create_projects_table.php 1.15 KB
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
            $table->string('title');
            $table->string('payment_id')->nullable();
            $table->string('address')->nullable();
            $table->string('target_amount')->nullable();
22
            $table->string('state')->default('OPENED');
23
            $table->string('filename')->nullable();
24
            $table->unsignedInteger('merge_request_id')->unique();
25
26
27
28
            $table->string('gitlab_username');
            $table->string('gitlab_url');
            $table->string('gitlab_state')->default('opened');
            $table->timestamp('gitlab_created_at');
beardedwarrior's avatar
beardedwarrior committed
29
30
31
32
33
34
35
36
37
38
39
40
41
42
            $table->timestamps();
        });
    }

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