When the old block with database schema is already present in file, but was moved around (eg. pushed to the bottom of documentation block), instead of rewriting the file, replace old schema info with new one in the same place.
Replacing old block with new one.
This seems to break an existing behavior. Can you take a look at the test result (first failure)?
Yea, just noticed it fails. I'll take a look in some free time, but from the quick glance, test fails becouse functionality changed. Not sure how to resolve it.
My change is that if the block moved in comments (my use case is to put schema info at the top of the class but at the end of comment block) it should be replaced in-place. The test checks if after changing settings location of Schema block moves from top-to-bottom, but it won't move since it's replaced in-place.
What do you think should be behaviour here? should old comments still be relaced in-place and new ones put on the bottom (once located comments do not move), or changing setting should move the comment block from top to bottom?
Your use case makes sense but I think most people would expect that it should honor the specified position. This reminds me of #119.
Maybe changing the setting should only move the block if "-p after --force" is specified?
This may already be an existing behavior.
@ctran Seems sensible. I'll test it and adjust the test case and/or documentation.
I have a working version and will check it in soon.