Files
snipe-it/database/migrations/2023_03_21_215218_update_slack_setting.php
2026-03-13 18:12:37 +00:00

37 lines
763 B
PHP

<?php
use App\Models\Setting;
use Illuminate\Database\Migrations\Migration;
class UpdateSlackSetting extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
/*
* This is a dumb migration that would only affect a few people that would have been caught in the back-in-time
* migration change to change Slack to slack
*/
$settings = Setting::where('webhook_selected', '=', 'Slack')->get();
foreach ($settings as $setting) {
$setting->webhook_selected = 'slack';
$setting->save();
}
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
//
}
}