Skip to content

Commit

Permalink
(Add) Migrations
Browse files Browse the repository at this point in the history
- this branch will cover #220
  • Loading branch information
HDVinnie committed Dec 3, 2018
1 parent 8061a3b commit 242be73
Show file tree
Hide file tree
Showing 3 changed files with 104 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateApplicationsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('applications', function (Blueprint $table) {
$table->increments('id');
$table->string('type');
$table->string('email')->unique();
$table->longText('refferer')->nullable();
$table->tinyInteger('status')->default(0);
$table->dateTime('moderated_at')->nullable();
$table->integer('moderated_by')->nullable()->index();
$table->integer('accepted_by')->nullable()->index();
$table->timestamps();
});
}

/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('applications');
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateApplicationImageProofsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('application_image_proofs', function (Blueprint $table) {
$table->increments('id');
$table->integer('application_id')->index();
$table->string('image');
$table->timestamps();
});
}

/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('application_image_proofs');
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateApplicationUrlProofsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('application_url_proofs', function (Blueprint $table) {
$table->increments('id');
$table->integer('application_id')->index();
$table->string('url');
$table->timestamps();
});
}

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

0 comments on commit 242be73

Please sign in to comment.