Minor DB rework, remove spaces in database/migration files

This commit is contained in:
Deon George
2021-05-03 22:12:26 +10:00
parent 6f4c58f01f
commit bede0a5880
13 changed files with 433 additions and 252 deletions

View File

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