format
This commit is contained in:
@@ -1,42 +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();
|
||||
}
|
||||
}
|
||||
<?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();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,28 +1,28 @@
|
||||
<?php namespace GermanAirlinesVa\Schooling\Updates;
|
||||
|
||||
use Schema;
|
||||
use October\Rain\Database\Updates\Migration;
|
||||
|
||||
class BuilderTableCreateMemberRanks extends Migration
|
||||
{
|
||||
public function up()
|
||||
{
|
||||
Schema::connection('germanairlinesva_schooling')->create('member_ranks', function ($table) {
|
||||
$table->engine = 'InnoDB';
|
||||
$table->bigIncrements('id')->unsigned();
|
||||
$table->string('name');
|
||||
$table->text('description');
|
||||
$table->integer('points')->unsigned();
|
||||
$table->integer('price')->unsigned();
|
||||
$table->string('badge');
|
||||
$table->string('region');
|
||||
});
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
Schema::connection('germanairlinesva_schooling')->disableForeignKeyConstraints();
|
||||
Schema::connection('germanairlinesva_schooling')->dropIfExists('member_ranks');
|
||||
Schema::connection('germanairlinesva_schooling')->enableForeignKeyConstraints();
|
||||
}
|
||||
}
|
||||
<?php namespace GermanAirlinesVa\Schooling\Updates;
|
||||
|
||||
use Schema;
|
||||
use October\Rain\Database\Updates\Migration;
|
||||
|
||||
class BuilderTableCreateMemberRanks extends Migration
|
||||
{
|
||||
public function up()
|
||||
{
|
||||
Schema::connection('germanairlinesva_schooling')->create('member_ranks', function ($table) {
|
||||
$table->engine = 'InnoDB';
|
||||
$table->bigIncrements('id')->unsigned();
|
||||
$table->string('name');
|
||||
$table->text('description');
|
||||
$table->integer('points')->unsigned();
|
||||
$table->integer('price')->unsigned();
|
||||
$table->string('badge');
|
||||
$table->string('region');
|
||||
});
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
Schema::connection('germanairlinesva_schooling')->disableForeignKeyConstraints();
|
||||
Schema::connection('germanairlinesva_schooling')->dropIfExists('member_ranks');
|
||||
Schema::connection('germanairlinesva_schooling')->enableForeignKeyConstraints();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user