Open educobuci opened 13 years ago
I'm not so good with database stuff.. (I'm really an iPhone dev toying with Rails)
I like this gem so gonna keep plugging away at it and try to iron out some problems.
Regarding this issue...
How about an initial patch to combine drop + create into an update method? This could also call .reset_column_information()
Once we've got this start to look at automation?
OK I've added a method to drop and create in my fork
Yep agreed. I've checked your pull request and I think you forgot to call the reset method :) You'll also have to call this method in the superclass.
ha! Yes I did. Bugger. Call it in both current class and any of it's supers?
Well I'm not sure :) For current class I think you should call in its superclass (just one level), but for an update in the superclass I think you should call for its any subclasses. In Ruby 1.9 you can get the class's subclasses in this way:
ObjectSpace.each_object(Class).select { |c| c < MyClass }
What do you think?
The citier view won't reflect further changes on the tables. So if you add a new column on the superclass or base class table, the views won't reflect this change. Here are some options we have to workaround this:
What you think about it guys?