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

Fix AR adapter when table doesn't exist #786

Merged
merged 4 commits into from
Dec 11, 2023
Merged

Fix AR adapter when table doesn't exist #786

merged 4 commits into from
Dec 11, 2023

Conversation

jnunemaker
Copy link
Collaborator

This only happens when you haven't migrated yet likely.

xref #557 (comment)

@jnunemaker jnunemaker self-assigned this Dec 11, 2023
@jnunemaker jnunemaker mentioned this pull request Dec 11, 2023
29 tasks
Copy link
Collaborator

@bkeepers bkeepers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🙇 thanks for fixing

This is available back to 5.2 which is lowest we kind of support.
@jnunemaker jnunemaker merged commit 8f57ada into main Dec 11, 2023
64 checks passed
@jnunemaker jnunemaker deleted the ar-fix branch December 11, 2023 21:36
@granth
Copy link

granth commented Dec 13, 2023

This also happens during db:setup in a CI run. Not a big deal!

@bkeepers
Copy link
Collaborator

@granth can you confirm this is fixed in 1.1.2?

@granth
Copy link

granth commented Dec 14, 2023

Sorry, I should have been more clear. I see the flipper_gates warning in 1.1.2 during db:setup.

Mysql2::Error: Table 'circle_test.flipper_gates' doesn't exist. You likely need to run `rails g flipper:active_record` and/or `rails db:migrate`.
Already memoized items
Running via Spring preloader in process 871
** Invoke db:setup (first_time)

I mean, it's true that the table doesn't exist!

Update: looks like this is triggered by $flipper = Flipper.instance in an initializer, which is there for historical reasons.

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.

4 participants