Skip to content
Snippets Groups Projects
Commit 17cb0373 authored by Kurniandha Sukma Yunastrian's avatar Kurniandha Sukma Yunastrian
Browse files

Add migration for criteria

parent a6faedd5
Branches
Tags
No related merge requests found
......@@ -17,6 +17,7 @@ class CreateUserprojectsTable extends Migration
$table->integer('idUser');
$table->integer('idProject');
$table->integer('role');
$table->integer('phase');
$table->timestamps();
});
}
......
......@@ -18,7 +18,7 @@ class CreateRequirementsTable extends Migration
$table->integer('idProject');
$table->integer('number');
$table->string('name');
$table->double('score', 8, 2)->nullable();;
$table->double('score', 8, 2)->nullable();
$table->timestamps();
});
}
......
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateCriteriasTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('criterias', function (Blueprint $table) {
$table->id();
$table->integer('idProject');
$table->string('name');
$table->integer('weight')->nullable();
$table->integer('used');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('criterias');
}
}
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateCriteriavotesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('criteriavotes', function (Blueprint $table) {
$table->integer('idUser');
$table->integer('idCriteria');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('criteriavotes');
}
}
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateCriteriaweightsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('criteriaweights', function (Blueprint $table) {
$table->id();
$table->integer('idUser');
$table->integer('idCriteria');
$table->integer('weight');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('criteriaweights');
}
}
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateCriteriaweightvotesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('criteriaweightvotes', function (Blueprint $table) {
$table->integer('idUser');
$table->integer('idWeight');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('criteriaweightvotes');
}
}
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment