dootask/database/migrations/2023_04_01_164418_update_file_pshare.php
2023-04-01 16:54:13 +08:00

27 lines
425 B
PHP

<?php
use Illuminate\Database\Migrations\Migration;
class UpdateFilePshare extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
\App\Models\File::whereShare(1)->wherePshare(0)->update(['pshare' => DB::raw('id')]);
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
//
}
}