I use Flyway with Spring boot to version control my DB, all well and good.
The issue is the SQL files will be stored in my source code under resources/db/migration/..
, and it's hosted on Github, so if someone could get my source code somehow from there, he will get all my database.
And also, in my case, I use a lot of TOKENS to connect with different external apps, and I found nothing in the Flyway docs that says how to hide sensible information in your SQL files.
so my questions are:
- How to secure the SQL files so that they will not be stored inside source code ?
- If there is no way to hide those SQL files, so how to secure sensitive information inside SQL files ?