-
-
Notifications
You must be signed in to change notification settings - Fork 254
Remove leftovers from activity log batch #1649
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
📝 WalkthroughWalkthroughBatch handling for activity logs was removed across the codebase: model annotations and validation dropped, batch service and its DI binding deleted, service constructor updated to remove batch dependency and usage, transformer no longer outputs batch, and a migration drops the batch column with a down reversal. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor Caller
participant Svc as ActivityLogService
participant DB as Database
Note over Caller,Svc: Old flow (before removal)
participant Batch as ActivityLogBatchService
Caller->>Svc: getActivity()/log(...)
Svc->>Batch: uuid()
Batch-->>Svc: batch UUID
Svc->>DB: create ActivityLog (includes batch)
DB-->>Svc: ActivityLog saved
Svc-->>Caller: result
sequenceDiagram
autonumber
actor Caller
participant Svc as ActivityLogService
participant DB as Database
Note over Caller,Svc: New flow (after removal)
Caller->>Svc: getActivity()/log(...)
Svc->>DB: create ActivityLog (no batch)
DB-->>Svc: ActivityLog saved
Svc-->>Caller: result
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (3)
database/migrations/2025_09_03_080547_remove_batch_column_from_activity_logs.php (3)
12-17: Guard the drop and account for potential index.To avoid failures on envs where the column is already gone (or to ease repeated deploys), consider guarding with Schema::hasColumn and optionally dropping any index before the column.
public function up(): void { - Schema::table('activity_logs', function (Blueprint $table) { - $table->dropColumn('batch'); - }); + if (Schema::hasColumn('activity_logs', 'batch')) { + Schema::table('activity_logs', function (Blueprint $table) { + // If 'batch' was indexed, uncomment the next line: + // $table->dropIndex(['batch']); + $table->dropColumn('batch'); + }); + } }
24-26: Prefer uuid() for clarity; confirm original type/nullability.If this was a UUID, using uuid() documents intent and maps to CHAR(36) on MySQL.
- $table->string('batch', 36)->nullable(); + $table->uuid('batch')->nullable();
12-17: Operational note: dropping a column on large tables can lock or rebuild.Coordinate rollout during a low-traffic window and test on staging to estimate migration time for your DB engine/version.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (6)
app/Models/ActivityLog.php(0 hunks)app/Providers/ActivityLogServiceProvider.php(0 hunks)app/Services/Activity/ActivityLogBatchService.php(0 hunks)app/Services/Activity/ActivityLogService.php(0 hunks)app/Transformers/Api/Client/ActivityLogTransformer.php(0 hunks)database/migrations/2025_09_03_080547_remove_batch_column_from_activity_logs.php(1 hunks)
💤 Files with no reviewable changes (5)
- app/Transformers/Api/Client/ActivityLogTransformer.php
- app/Providers/ActivityLogServiceProvider.php
- app/Models/ActivityLog.php
- app/Services/Activity/ActivityLogService.php
- app/Services/Activity/ActivityLogBatchService.php
🔇 Additional comments (2)
database/migrations/2025_09_03_080547_remove_batch_column_from_activity_logs.php (2)
7-28: LGTM: Simple, symmetric migration.The up/down pair is clean and matches the PR intent to remove the batch surface.
1-28: dropColumn('batch') migration is safe as-is: composer.json includes doctrine/dbal (~3.6.0), no indexes/uniques onbatchexist, and there are no remaining code references.
Some parts where already removed when we removed the old admin area. This removes the remaining leftovers.