Skip to content

A free open source IT asset/license management system

Fix comment to properly reflext the current state of the database

Brady Wetherington27d74494591d
diff --git a/database/migrations/2025_10_22_144927_migrate_incorrect_action_types.php b/database/migrations/2025_10_22_144927_migrate_incorrect_action_types.php
index 7eff84667a..b27ed56ef3 100644
--- a/database/migrations/2025_10_22_144927_migrate_incorrect_action_types.php
+++ b/database/migrations/2025_10_22_144927_migrate_incorrect_action_types.php
@@ -13,16 +13,9 @@ return new class extends Migration
{
/**
- * So the concern here is that the following statement _could_ take a long time - the action_logs table is not indexed
- * against the action_type column (and shouldn't be) so this could take a few beats. But, still, we're not talking about
- * a particularly wide table or anything; we've certainly heard about a couple of times where people had a few million
- * action_logs but, again, not too many more than that.
- *
- * But @snipe has mentioned multiple times that in some older migrations, trying to run an UPDATE in batch, there were
- * memory issues.
- *
- * I've investigated and it looks like we've rarely or never done a 'batch update' the way we do below. I'm pretty sure
- * it will be fine (famous last words...)
+ * We actually *do* have an index on action_type, so this query shouldn't take too terribly long. I don't know
+ * that we have a ton of people canceling requests (and only certain types of request-cancellation use this
+ * erroneous action_type), so I feel pretty comfortable with this fixup. Fingers crossed!
* */
DB::table('action_logs')->where('action_type', 'request_canceled')->update(['action_type' => 'request canceled']);