mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-09 23:24:06 -08:00
Fixes back-in-time Slack v slack migration
Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
parent
e609130291
commit
76425ca2a5
|
@ -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()
|
||||
{
|
||||
//
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue