pixelfed/database/migrations/2022_02_13_091135_add_missi...

33 wiersze
576 B
PHP

<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
use App\Status;
class AddMissingReblogOfIdTypesToStatusesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Status::whereNotNull('reblog_of_id')
->whereNull('type')
->update([
'type' => 'share'
]);
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
}
}