create migrate file
This commit is contained in:
parent
dcd15ef578
commit
16af707711
|
|
@ -0,0 +1,33 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('sprint', function (Blueprint $table) {
|
||||
$table->unsignedBigInteger('id')->primary();
|
||||
$table->string('name');
|
||||
$table->integer('point');
|
||||
$table->integer('project_id');
|
||||
$table->date('start_date');
|
||||
$table->date('end_date');
|
||||
$table->date('complete_date')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('sprint');
|
||||
}
|
||||
};
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('criterias', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('name');
|
||||
$table->string('description');
|
||||
$table->string('type');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('criterias');
|
||||
}
|
||||
};
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('sprints_criterias', function (Blueprint $table) {
|
||||
$table->unsignedBigInteger('sprint_id');
|
||||
$table->unsignedBigInteger('criteria_id');
|
||||
$table->integer('point');
|
||||
$table->string('expect_result');
|
||||
$table->string('actual_result');
|
||||
$table->string('note')->nullable();
|
||||
$table->string('created_by');
|
||||
|
||||
$table->foreign('sprint_id')->references('id')->on('sprints')->onDelete('cascade');
|
||||
$table->foreign('criteria_id')->references('id')->on('criterias')->onDelete('cascade');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('sprints_criterias');
|
||||
}
|
||||
};
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('test_cases_for_sprint', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('name');
|
||||
$table->string('position');
|
||||
$table->string('input')->nullable();
|
||||
$table->string('expect_output');
|
||||
$table->string('actual_output');
|
||||
$table->string('note')->nullable();
|
||||
$table->string('issue_id_on_jira')->nullable();
|
||||
$table->string('bug_id_on_jira')->nullable();
|
||||
$table->unsignedBigInteger('sprint_id');
|
||||
$table->string('created_by');
|
||||
|
||||
$table->foreign('sprint_id')->references('id')->on('sprints')->onDelete('cascade');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('test_cases_for_sprint');
|
||||
}
|
||||
};
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('users_criterias', function (Blueprint $table) {
|
||||
$table->unsignedBigInteger('user_id');
|
||||
$table->unsignedBigInteger('criteria_id');
|
||||
$table->unsignedBigInteger('sprint_id');
|
||||
$table->integer('point');
|
||||
$table->string('note')->nullable();
|
||||
$table->string('created_by');
|
||||
|
||||
$table->foreign('user_id')->references('id')->on('users')->onDelete('cascade');
|
||||
$table->foreign('criteria_id')->references('id')->on('criterias')->onDelete('cascade');
|
||||
$table->foreign('sprint_id')->references('id')->on('sprints')->onDelete('cascade');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('users_criterias');
|
||||
}
|
||||
};
|
||||
Loading…
Reference in New Issue