Skip to content
Snippets Groups Projects
2018_09_10_211623_create_projects_table.php 1.23 KiB
Newer Older
beardedwarrior's avatar
beardedwarrior committed
<?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');
            $table->unsignedInteger('subaddr_index')->nullable();
            $table->string('address_uri')->nullable();
            $table->string('qr_code')->nullable();
            $table->float('target_amount');
            $table->float('raised_amount')->default(0);
            $table->string('state');
            $table->string('filename')->unique();
xiphon's avatar
xiphon committed
            $table->unsignedInteger('milestones');
            $table->unsignedInteger('milestones_completed')->default(0);
            $table->string('gitlab_url')->nullable();
beardedwarrior's avatar
beardedwarrior committed
            $table->timestamps();
        });
    }

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