33 lines
576 B
PHP
33 lines
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()
|
|
{
|
|
}
|
|
}
|