chore: migrate max_assignment_limit to agent capacity policies

Adds a data migration and rake task to convert inbox max_assignment_limit
settings into AgentCapacityPolicy records with per-inbox conversation
limits, preserving the exact capacity-based semantics.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
tds-1
2026-03-16 11:57:28 +05:30
co-authored by Claude Opus 4.6
parent 28bf9fa5f9
commit 9f345c8d48
2 changed files with 62 additions and 0 deletions
@@ -0,0 +1,11 @@
# Manually run the max_assignment_limit to agent capacity policy migration.
# This is idempotent and safe to run multiple times.
#
# Usage:
# bundle exec rake assignment:migrate_max_limit
namespace :assignment do
desc 'Migrate max_assignment_limit from inbox config to agent capacity policies'
task migrate_max_limit: :environment do
MigrateMaxAssignmentLimitToPolicies.new.up
end
end