Merge pull request #12707 from snipe/fixes/fixed_migration_for_demo

Fixes back-in-time Slack v slack migration
This commit is contained in:
snipe 2023-03-21 22:01:17 -07:00 committed by GitHub
commit b45dc09f57
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -0,0 +1,37 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
use App\Models\Setting;
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->update(['webhook_selected' => 'slack']);
}
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
//
}
}