Skip to content
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

Don't search for indices on classes without tables #150

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

fightingtheboss
Copy link

@fightingtheboss fightingtheboss commented Mar 7, 2024

The LolDba::IndexFinder was iterating over all subclasses of ActiveRecord::Base, including abstract classes that don't have backing tables in the DB (namely ActionText and ActionMailbox).

This change simply omits classes without backing tables from the search for missing indices.

Resolves #146

@fightingtheboss fightingtheboss changed the title Don't search for indices on abstract classes Don't search for indices on classes without tables Mar 7, 2024
Update the `LolDba::IndexFinding.model_classes` method to return only classes that have a table in the database.
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.

Mysql2::Error: Table 'myapp_development.action_text_rich_texts' doesn't exist
1 participant