This commit is contained in:
Your Name 2021-08-03 22:05:39 +02:00
parent 2106f15d7f
commit b4ccced253
7 changed files with 93 additions and 1 deletions

View File

@ -45,6 +45,8 @@ class Plugin extends PluginBase
});
\Illuminate\Support\Facades\Broadcast::routes(['prefix' => '', 'middleware' => 'GermanAirlinesVA\\Graphql\\Classes\\Authentication']);
require("channels/channels.php");
Config::set('database.connections.germanairlinesva_graphql', Config::get('germanairlinesva.graphql::connection'));
}
public function bootPackages()

5
README.md Normal file
View File

@ -0,0 +1,5 @@
# Relations
## GraphQLKeys
- **TODO** BelongsTo Member (External DB)

View File

@ -4,6 +4,27 @@ use Cms\Classes\Theme;
use GermanAirlinesVa\Graphql\Models\Settings;
return [
'connection' => [
'driver' => 'mysql',
'url' => env('DATABASE_URL'),
'host' => env('DB_HOST', '127.0.0.1'),
'port' => env('DB_PORT', '3306'),
'database' => 'germanairlinesva_graphql',
'username' => env('DB_USERNAME', 'root'),
'password' => env('DB_PASSWORD', ''),
'unix_socket' => env('DB_SOCKET', ''),
'charset' => 'utf8mb4',
'collation' => 'utf8mb4_unicode_ci',
'prefix' => '',
'prefix_indexes' => true,
'strict' => true,
'engine' => 'InnoDB',
'options' => extension_loaded('pdo_mysql')
? array_filter([
PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'),
])
: [],
],
'packages' => [
'nuwave/lighthouse' => [
'config_namespace' => 'lighthouse',

5
updates/README.md Normal file
View File

@ -0,0 +1,5 @@
# Relations
## GraphQLKeys
- **TODO** BelongsTo Member (External DB)

View File

@ -0,0 +1,31 @@
<?php namespace GermanAirlinesVa\GraphQl\Updates;
use Config;
use Schema;
use October\Rain\Database\Updates\Migration;
class BuilderTableCreateGermanAirlinesVaGraphQlDeferredBindings extends Migration
{
public function up()
{
Schema::connection('germanairlinesva_graphql')->create('deferred_bindings', function ($table) {
$table->engine = 'InnoDB';
$table->increments('id')->unsigned();
$table->string('master_type');
$table->string('master_field');
$table->string('slave_type');
$table->integer('slave_id');
$table->mediumText('pivot_data')->nullable();
$table->string('session_key');
$table->boolean('is_bind')->default(true);
$table->timestamps();
});
}
public function down()
{
Schema::connection('germanairlinesva_graphql')->disableForeignKeyConstraints();
Schema::connection('germanairlinesva_graphql')->dropIfExists('deferred_bindings');
Schema::connection('germanairlinesva_graphql')->enableForeignKeyConstraints();
}
}

View File

@ -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();
}
}

View File

@ -1,2 +1,4 @@
1.0.1:
- Initialize plugin.
- 'Initialize plugin.'
- 'Create table deferred_bindings'
- builder_table_create_deferred_bindings.php