Database
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
<?php namespace GermanAirlinesVa\GraphQl\Updates;
|
||||
|
||||
use Config;
|
||||
use Schema;
|
||||
use October\Rain\Database\Updates\Migration;
|
||||
|
||||
class BuilderTableCreateGermanAirlinesVaGraphQlGraphQlKeys extends Migration
|
||||
{
|
||||
public function up()
|
||||
{
|
||||
Schema::connection('germanairlinesva_graphql')->create('graphql_keys', function ($table) {
|
||||
$table->engine = 'InnoDB';
|
||||
$table->bigIncrements('id')->unsigned();
|
||||
$table->datetime('valid_from')->default(DB::raw('NOW()'));
|
||||
$table->datetime('valid_to')->default(DB::raw('NOW()'));
|
||||
$table->string('key');
|
||||
});
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
Schema::connection('germanairlinesva_graphql')->disableForeignKeyConstraints();
|
||||
Schema::connection('germanairlinesva_graphql')->dropIfExists('graphql_keys');
|
||||
Schema::connection('germanairlinesva_graphql')->enableForeignKeyConstraints();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user