diff --git a/database/migrations/2019_05_30_225937_device_groups_rewrite.php b/database/migrations/2019_05_30_225937_device_groups_rewrite.php index a88d1b4bda..e9660dd3d3 100644 --- a/database/migrations/2019_05_30_225937_device_groups_rewrite.php +++ b/database/migrations/2019_05_30_225937_device_groups_rewrite.php @@ -28,10 +28,12 @@ class DeviceGroupsRewrite extends Migration */ public function down() { -// Schema::table('device_groups', function (Blueprint $table) { -// $table->string('desc')->change(); -// $table->dropColumn(['type', 'rules']); -// $table->text('params')->nullable()->after('pattern'); -// }); + if (\LibreNMS\DB\Eloquent::getDriver() !== 'sqlite') { + Schema::table('device_groups', function (Blueprint $table) { + $table->string('desc')->change(); + $table->dropColumn(['type', 'rules']); + $table->text('params')->nullable()->after('pattern'); + }); + } } } diff --git a/database/migrations/2021_12_02_100709_remove_ports_stp_unique_index.php b/database/migrations/2021_12_02_100709_remove_ports_stp_unique_index.php index b805a83d40..1bc1635176 100644 --- a/database/migrations/2021_12_02_100709_remove_ports_stp_unique_index.php +++ b/database/migrations/2021_12_02_100709_remove_ports_stp_unique_index.php @@ -26,7 +26,7 @@ class RemovePortsStpUniqueIndex extends Migration public function down() { Schema::table('ports_stp', function (Blueprint $table) { - $table->unique(['device_id', 'port_index']); + $table->unique(['device_id', 'port_id']); }); } }