[wishlist/enhancement] hobofields conversions
Reported by Mathijs Kwik | July 29th, 2008 @ 01:50 AM | in Beyond Hobo 1.0
It would be nice if hobofields has methods for converting different datatypes into eachother.
So when a field goes from :text to :html, simple_format should be applied(if wanted).
Same goes for converting other text-based stuff like textile and markdown.into eachother. Or html back to plain text.
int => string and back should work ofcourse.
when deciding a string-field should become an enum, hobofields should be able to check all existing values against the enum and correct/set to default if non-matches are found.
when moving from enum to a full model (status in agility tutorial), hobofields should offer to pre-populate the new table with the values that were previously in the enum. It should setup associations accordingly.
Comments and changes to this ticket
-
Tom Locke July 29th, 2008 @ 09:06 AM
- Tag changed from enhancement, hobofields to enhancement, hobofields, migrations
- Milestone set to Beyond Hobo 1.0
Now you're getting fancy :) Yes I've thought about this stuff too. Dabble-DB does this stuff very nicely.
when moving from enum to a full model (status in agility tutorial), hobofields should offer to pre-populate the new table with the values that were previously in the enum. It should setup associations accordingly.
Even if the original field is not an enum. E.g. in a simple first-cut, the owner of some model might be just a 'name' string field. That could later become an association to a user model.
Another one: when a default is added to an existing column, set all existing null values to that default. That should be optional. Well they probably all should.
I don't think this is a priority for 1.0 though.
-
Tom Locke July 29th, 2008 @ 10:57 AM
- State changed from new to open
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป