-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Normalised first and lasted edited time to use revisions (#854)
This commit calculates the last edited time using a similar methodology to the existing one to calculate first edited time. It uses the `allrevisions` list. This method will exclude all revisions created by the PlatformReservedUser. This means that it will erroneously ignore revisions from importing entities. This commit also introduces a migration to refresh all WikiLifecycleEvents Bug: T364991
- Loading branch information
Showing
3 changed files
with
277 additions
and
241 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
database/migrations/2024_08_01_193038_remove_and_rebuild_wiki_lifecycle_events.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?php | ||
|
||
use App\Jobs\UpdateWikiSiteStatsJob; | ||
use App\WikiLifecycleEvents; | ||
use Illuminate\Database\Migrations\Migration; | ||
|
||
return new class extends Migration | ||
{ | ||
/** | ||
* Run the migrations. | ||
*/ | ||
public function up(): void | ||
{ | ||
WikiLifecycleEvents::query()->delete(); | ||
UpdateWikiSiteStatsJob::dispatch(); | ||
} | ||
|
||
/** | ||
* Reverse the migrations. | ||
*/ | ||
public function down(): void | ||
{ | ||
// | ||
} | ||
}; |
Oops, something went wrong.