Add per-table concurrent timeout overrides - #160
Open
mathyoudawson wants to merge 3 commits into
Open
Conversation
…errides Lets apps configure a table_overrides hash on register_database so a specific table (e.g. a huge payments table) can have a longer concurrent statement/lock timeout than the database-wide default, without loosening it for every table. Falls back to the database-level value for any table (or key) not listed; per-migration set_lock_timeout/set_statement_timeout still takes precedence. Bumps version to 3.2.0. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
mathyoudawson
marked this pull request as ready for review
August 14, 2026 14:30
table and mixins were each concatenating up_instructions + down_instructions inline; pull that into a shared private helper instead.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
table_overridesconfig hash toregister_database, letting apps overrideconcurrent_lock_timeout/concurrent_statement_timeoutfor specific tables (e.g. a hugepaymentstable needing a longer statement timeout than the database-wide default).set_lock_timeout/set_statement_timeoutstill takes precedence over both.table_overridesdefaults to{}, no behaviour changes for existing configs.Bumps version to 3.2.0.
Test plan
bundle exec rspec— 447 examples, 0 failuresbundle exec rubocop— 0 offensesMultiDatabase::Database,Config, andMigrationcovering: override present/absent, partial-key overrides, string/symbol table names, per-migration override precedence, and multi-databasedatabase_name+ table resolution together🤖 Generated with Claude Code