Deferred Bindings
This commit is contained in:
parent
839f50a836
commit
1f448b1ec4
31
updates/builder_table_create_deferred_bindings.php
Normal file
31
updates/builder_table_create_deferred_bindings.php
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
<?php namespace GermanAirlinesVa\Fleet\Updates;
|
||||||
|
|
||||||
|
use Config;
|
||||||
|
use Schema;
|
||||||
|
use October\Rain\Database\Updates\Migration;
|
||||||
|
|
||||||
|
class BuilderTableCreateGermanAirlinesVaSchoolingDeferredBindings extends Migration
|
||||||
|
{
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
Schema::connection('germanairlinesva_schooling')->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_schooling')->disableForeignKeyConstraints();
|
||||||
|
Schema::connection('germanairlinesva_schooling')->dropIfExists('deferred_bindings');
|
||||||
|
Schema::connection('germanairlinesva_schooling')->enableForeignKeyConstraints();
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,5 +1,7 @@
|
|||||||
1.0.1:
|
1.0.1:
|
||||||
- 'Initialize plugin.'
|
- 'Initialize plugin.'
|
||||||
|
- 'Create table deferred_bindings'
|
||||||
|
- builder_table_create_deferred_bindings.php
|
||||||
1.0.2:
|
1.0.2:
|
||||||
- 'Created table typeratings'
|
- 'Created table typeratings'
|
||||||
- builder_table_create_typeratings.php
|
- builder_table_create_typeratings.php
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user