Merge branch 'develop' into feature/react-admin

This commit is contained in:
Matthew Penner 2021-02-24 17:30:18 -07:00
commit b8788d1af1
10 changed files with 179 additions and 33 deletions

View file

@ -0,0 +1,39 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class AddIndexForServerAndAction extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('audit_logs', function (Blueprint $table) {
// Doing the index in this order lets me use the action alone without the server
// or I can later include the server to also filter down at an even more specific
// level.
//
// Ordering the other way around would require a second index for only "action" in
// order to query a specific action type for any server. Remeber, indexes run left
// to right in MySQL.
$table->index(['action', 'server_id']);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('audit_logs', function (Blueprint $table) {
$table->dropIndex(['action', 'server_id']);
});
}
}

View file

@ -0,0 +1,32 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class MakeSftpPortUnsignedInt extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('nodes', function (Blueprint $table) {
$table->unsignedSmallInteger('daemonSFTP')->default(2022)->change();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('nodes', function (Blueprint $table) {
$table->smallInteger('daemonSFTP')->default(2022)->change();
});
}
}