Backfill existing rooms to public so older shared links are joinable.
Deploy Ladill Meet / deploy (push) Successful in 1m26s
Deploy Ladill Meet / deploy (push) Successful in 1m26s
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
use App\Models\Room;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
Room::withTrashed()
|
||||
->whereNotNull('settings')
|
||||
->get()
|
||||
->each(function (Room $room): void {
|
||||
$settings = $room->settings;
|
||||
if (! is_array($settings) || empty($settings['invite_only'])) {
|
||||
return;
|
||||
}
|
||||
|
||||
$settings['invite_only'] = false;
|
||||
$room->forceFill(['settings' => $settings])->saveQuietly();
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
// Prior invite-only state is not restored.
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user