Files
librenms-librenms/database/migrations/2019_08_28_105051_fix-template-linefeeds.php
2020-09-21 15:51:53 +02:00

27 lines
555 B
PHP

<?php
use Illuminate\Database\Migrations\Migration;
class FixTemplateLinefeeds extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
DB::table('alert_templates')->update(['template' => DB::raw('REPLACE(`template`, \'\\\\r\\\\n\', char(10))')]);
DB::table('alert_templates')->update(['template' => DB::raw('REPLACE(`template`, \'\\\\n\', \'\')')]);
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
}
}