Flyway with manual review

731 views Asked by At

Currently I understand flyway has commandline support. We, as developer (or devops :)) we deploy automatically with jenkins and standard tool chain we have.

Issues is when we do application release, We have to apply DB patches. We can definitely automate them; But process at our organization says "we have DBA that needs to review your sql before you apply".

We know its relatively useless, But we still need to support that. Can you suggest a way of doing these ? I mean can / does flyway have hooks that tell us list of migration sql will be applied ? and print on screen or something ,then DBA can execute the same ?

Or can we do some addon to do the same ?

Would really appreciate help here from flyway team.

This is only thing stops us from using flyway in real application.

1

There are 1 answers

2
Software Engineer On

This answer is about 6 months too late, sorry, and it's a 'you're doing the wrong thing' answer.

Code review is generally accepted as being a good thing, and this applies to database scripts just as much as java/es/go/c++/cobol/whatever code. However, to be effective, the review should be done as soon as possible after the code is written. Doing a review as part of application release -- to any environment -- is way too late. By then the code is probably cold, further, it's way past the point where development and changes are happening. Basically, it's too late to be doing reviews at this stage.

Rather than do this you need to engage your DBAs to do the review as part of the development process -- as early as possible in fact. This way they'll never be in the position of trying to run an unreviewed script, and you'll be able to fully automate using flyway (or any other tool you like).

Hope this helps.