Minor DB rework, remove spaces in database/migration files
This commit is contained in:
@@ -6,57 +6,57 @@ use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class CreateEchomailTables extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('echomail_kludge', function (Blueprint $table) {
|
||||
$table->integer('echomail_id');
|
||||
$table->string('kludge_id')->nullable();
|
||||
$table->json('value');
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('echomail_kludge', function (Blueprint $table) {
|
||||
$table->integer('echomail_id');
|
||||
$table->string('kludge_id')->nullable();
|
||||
$table->json('value');
|
||||
|
||||
$table->index('echomail_id');
|
||||
$table->foreign('echomail_id')->references('id')->on('echomails');
|
||||
});
|
||||
$table->index('echomail_id');
|
||||
$table->foreign('echomail_id')->references('id')->on('echomails');
|
||||
});
|
||||
|
||||
Schema::create('echomail_seenby', function (Blueprint $table) {
|
||||
$table->integer('echomail_id');
|
||||
$table->integer('node_id');
|
||||
Schema::create('echomail_seenby', function (Blueprint $table) {
|
||||
$table->integer('echomail_id');
|
||||
$table->integer('node_id');
|
||||
|
||||
$table->unique(['echomail_id','node_id']);
|
||||
$table->unique(['echomail_id','node_id']);
|
||||
|
||||
$table->index('echomail_id');
|
||||
$table->foreign('echomail_id')->references('id')->on('echomails');
|
||||
$table->index('node_id');
|
||||
$table->foreign('node_id')->references('id')->on('nodes');
|
||||
});
|
||||
$table->index('echomail_id');
|
||||
$table->foreign('echomail_id')->references('id')->on('echomails');
|
||||
$table->index('node_id');
|
||||
$table->foreign('node_id')->references('id')->on('nodes');
|
||||
});
|
||||
|
||||
Schema::create('echomail_path', function (Blueprint $table) {
|
||||
$table->integer('echomail_id');
|
||||
$table->integer('node_id');
|
||||
$table->integer('sequence');
|
||||
Schema::create('echomail_path', function (Blueprint $table) {
|
||||
$table->integer('echomail_id');
|
||||
$table->integer('node_id');
|
||||
$table->integer('sequence');
|
||||
|
||||
$table->unique(['echomail_id','sequence']);
|
||||
$table->unique(['echomail_id','sequence']);
|
||||
|
||||
$table->index('echomail_id');
|
||||
$table->foreign('echomail_id')->references('id')->on('echomails');
|
||||
$table->index('node_id');
|
||||
$table->foreign('node_id')->references('id')->on('nodes');
|
||||
});
|
||||
}
|
||||
$table->index('echomail_id');
|
||||
$table->foreign('echomail_id')->references('id')->on('echomails');
|
||||
$table->index('node_id');
|
||||
$table->foreign('node_id')->references('id')->on('nodes');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('echomail_path');
|
||||
Schema::dropIfExists('echomail_seenby');
|
||||
Schema::dropIfExists('echomail_kludge');
|
||||
}
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('echomail_path');
|
||||
Schema::dropIfExists('echomail_seenby');
|
||||
Schema::dropIfExists('echomail_kludge');
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user