Fix some broken migrations (#14040)

This commit is contained in:
Jellyfrog
2022-06-14 15:01:07 +02:00
committed by GitHub
co-authored by GitHub
parent 8980614031
commit f3281b218f
2 changed files with 8 additions and 6 deletions
@@ -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');
});
}
}
}
@@ -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']);
});
}
}