Callbacks and Database Sessions
BenTimbrell
Posts: 2 New member
Hi
It looks like my beforeMigrate callback in not being run in the same session as the migration.
I am using Sybase/SAP ASE version 16.
I'd like to run a database command to turn replication off before running the migration, but it needs to be in the same session as the migration. The callback and the migration seem to be running in different database sessions.
Is there any way to ensure the two run in the same session? Or another way I can achieve this with Flyway?
Thanks
Ben
It looks like my beforeMigrate callback in not being run in the same session as the migration.
I am using Sybase/SAP ASE version 16.
I'd like to run a database command to turn replication off before running the migration, but it needs to be in the same session as the migration. The callback and the migration seem to be running in different database sessions.
Is there any way to ensure the two run in the same session? Or another way I can achieve this with Flyway?
Thanks
Ben
Tagged:
Best Answer
-
Peter_Laws Posts: 289 Silver 2Hello BenTimbrell,
Thank you for the question, I think you'd get on better using https://documentation.red-gate.com/flyway/flyway-cli-and-api/configuration/parameters/environments/init-sql
Answers