Rank Question

This commit is contained in:
Gogs
2021-06-16 22:08:53 +02:00
parent dfe1530d27
commit e4373729c5
20 changed files with 375 additions and 52 deletions
@@ -0,0 +1,42 @@
<?php namespace GermanAirlinesVa\Schooling\Updates;
use Schema;
use October\Rain\Database\Updates\Migration;
class BuilderTableCreateExamQuestions extends Migration
{
public function up()
{
Schema::connection('germanairlinesva_schooling')->create('exam_questions', function ($table) {
$table->engine = 'InnoDB';
$table->bigIncrements('id')->unsigned();
$table
->bigInteger('member_rank_id')
->unsigned()
->nullable();
$table
->foreign('member_rank_id')
->references('id')
->on('member_ranks');
$table
->bigInteger('typerating_id')
->unsigned()
->nullable();
$table
->foreign('typerating_id')
->references('id')
->on('typeratings');
$table->boolean('in_use');
$table->boolean('mandatory');
$table->text('text');
$table->string('picture');
});
}
public function down()
{
Schema::connection('germanairlinesva_schooling')->disableForeignKeyConstraints();
Schema::connection('germanairlinesva_schooling')->dropIfExists('exam_questions');
Schema::connection('germanairlinesva_schooling')->enableForeignKeyConstraints();
}
}
+2
View File
@@ -7,3 +7,5 @@
- builder_table_create_typeratings.php
- 'Created table member_ranks'
- builder_table_create_member_ranks.php
- 'Created table exam_questions'
- builder_table_create_exam_questions.php