As part of our effort to migrate our SQL scripts to flyway migrations, we’ve come across some scripts that make heavy use of the Oracle sqlplus CONNECT statement. Removing them and using a user that would have the required permissions (e.g. SYSTEM) is unfortunately not an option.
We’re now wondering if there is an elegant way to execute the individual migrations using different accounts? If this would be supported, splitting the scripts around the CONNECT statements could lead to an elegant solution of our problem.
How is everybody else dealing with database migrations that require different accounts?
One option to try, would be to separate the lifecycle of the migrations per account.
You can then have one Flyway instance per account, configured with the corresponding user and only dealing with the objects of that specific account.