Initial
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
<?php namespace GermanAirlinesVa\Routes\Updates;
|
||||
|
||||
use Schema;
|
||||
use October\Rain\Database\Updates\Migration;
|
||||
|
||||
class BuilderTableCreateAirports extends Migration
|
||||
{
|
||||
public function up()
|
||||
{
|
||||
Schema::connection('germanairlinesva_routes')->create('airports', function ($table) {
|
||||
$table->engine = 'InnoDB';
|
||||
$table->bigIncrements('id')->unsigned();
|
||||
$table->string('iata', 3);
|
||||
$table->string('icao', 3);
|
||||
$table->string('name');
|
||||
$table->string('country');
|
||||
$table->string('elevation');
|
||||
$table->string('latitude');
|
||||
$table->string('longitude');
|
||||
});
|
||||
}
|
||||
|
||||
public function down()
|
||||
{
|
||||
Schema::connection('germanairlinesva_routes')->dropIfExists('airports');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
<?php namespace GermanAirlinesVa\Routes\Updates;
|
||||
|
||||
use Schema;
|
||||
use October\Rain\Database\Updates\Migration;
|
||||
|
||||
class BuilderTableCreateGermanAirlinesVaRoutesDeferredBindings extends Migration
|
||||
{
|
||||
public function up()
|
||||
{
|
||||
Schema::connection('germanairlinesva_routes')->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_routes')->disableForeignKeyConstraints();
|
||||
Schema::connection('germanairlinesva_routes')->dropIfExists('deferred_bindings');
|
||||
Schema::connection('germanairlinesva_routes')->enableForeignKeyConstraints();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
1.0.1:
|
||||
- 'Initialize plugin.'
|
||||
- 'Create table deferred_bindings'
|
||||
- builder_table_create_deferred_bindings.php
|
||||
1.0.2:
|
||||
- 'Create table airports'
|
||||
- builder_table_create_airports.php
|
||||
Reference in New Issue
Block a user