I am trying to create a service which should use existing database (Producton) which is already using flyway. I want to add flyway migrations to my service and those migration should not delete existing schema and create new empty schema.
I am using CREATE IF NOT EXISTS to make sure that my script should not delete existing table and create same table again without any data.
Before I proceed with it, I just want to know does flyway validate table schema against entity and second question is what will be better choice to start with flyway migration with existing database which is also using flyway migration.
I have tried using IF NOT EXISTS in scripts to avoid deletion of existing table in database.
I am expecting answers for two queries –
1 – does flyway validate table schema against entity
2 – Better solution for flyway migration when we are dealing with existing database (which is using flyway)