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

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