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

Support for default procs #32

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

atomical
Copy link

The column :default can be a Proc. This supports the new syntax.

Relevant issues:
#28
SchemaPlus/schema_validations#71

@coveralls
Copy link

coveralls commented Dec 17, 2022

Coverage Status

Coverage: 99.553% (-0.4%) from 100.0% when pulling 3a5356a on atomical:support_for_default_procs into 7dcbc33 on SchemaPlus:master.

@atomical
Copy link
Author

I'm looking for when this was changed in AR. I think I should add an AR version check to my conditional. Thoughts?

@atomical
Copy link
Author

I found the commit.

rails/rails@744552f

ActiveRecord::Base.connection.version >= '5.6.0'

@atomical
Copy link
Author

I guess we could use the Rails version >= v5.0.0.beta2.

@ronen
Copy link
Member

ronen commented Apr 18, 2023

@atomical Thanks for working on this

Looking at the "Coverage decreased" error, I see that your new code isn't being tested.

Can you add a test case to the test suite to verify that your code works as expected?

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.

3 participants