31 lines
1005 B
PHP
31 lines
1005 B
PHP
<?php namespace GermanAirlinesVa\Social\Updates;
|
|
|
|
use Schema;
|
|
use October\Rain\Database\Updates\Migration;
|
|
|
|
class BuilderTableCreateGermanAirlinesVaSocialDeferredBindings extends Migration
|
|
{
|
|
public function up()
|
|
{
|
|
Schema::connection('germanairlinesva_social')->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_social')->disableForeignKeyConstraints();
|
|
Schema::connection('germanairlinesva_social')->dropIfExists('deferred_bindings');
|
|
Schema::connection('germanairlinesva_social')->enableForeignKeyConstraints();
|
|
}
|
|
}
|