-
Notifications
You must be signed in to change notification settings - Fork 5
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
autoexecute after db:migrate #8
Comments
That's surely a good idea because in most cases that's when you want to run it. I'm just afraid of a following scenario: I'm implementing some new feature and I have dirty working tree, including model file that is going to be updated by annotator. Now if because of some bug in annotator,or me doing some random stuff with annotator comments, annotator would somehow destroy some part of my work, I would be very very angry (I mean I would just press 'u' in vim, but anyway) . So this is not very probable, but that's why this feature is not there yet. But possibly I'm being paranoid. We could save same .bak files in tmp dir I suppose, but I'm not sure if it's worth the effort. What do you think? Should we backup them or care in general about such very unprobable events? |
I think this feature might be quite useful in some cases but when adding a foreign key field for an association you would still need to run annotator after the association was defined in the model. Otherwise there will be default TODOs for the field. |
That's a good point @vanyak. Although as you mention these TODOs would be fixed after running it again, so it could still work as a kind of reminder. I don't like trying to detect whether file is opened or not (btw, personally I keep .swps in non-default location). This idea with displaying some info after db:migrate may be interesting. |
it would be nice to run the task right after a
db:migrate
automatically, so user won't forget to comment the changes (if needed).We could add an option in an initializer to disable this feature.
What do you think?
The text was updated successfully, but these errors were encountered: