Skip to content

Support table prefixes in ActiveRecord adapter - #1037

Merged
jnunemaker merged 3 commits into
mainfrom
codex/active-record-table-prefix
Aug 5, 2026
Merged

Support table prefixes in ActiveRecord adapter#1037
jnunemaker merged 3 commits into
mainfrom
codex/active-record-table-prefix

Conversation

@jnunemaker

Copy link
Copy Markdown
Collaborator

Summary

ActiveRecord users can namespace Flipper tables with table_prefix: without defining custom feature and gate model classes. The adapter creates internal subclasses that target the prefixed tables while preserving explicit feature_class and gate_class overrides.

Both flipper:active_record and flipper:update accept --table-prefix, so initial migrations and future schema updates generate matching table names, migration filenames, and migration classes without manual edits.

Validation

  • ActiveRecord Minitest: 36 runs, 934 assertions, 0 failures
  • Rails generator tests: 15 runs, 105 assertions, 0 failures
  • ActiveRecord RSpec: 162 examples, 0 failures; 110 environment-dependent pending examples
  • git diff --check

The broader Redis-backed Minitest suite was not run because it requires FLUSHDB against a local Redis instance.

@jnunemaker
jnunemaker merged commit a3609bd into main Aug 5, 2026
47 checks passed
@jnunemaker
jnunemaker deleted the codex/active-record-table-prefix branch August 5, 2026 23:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant