jackc / tern

The SQL Fan's Migrator
MIT License
925 stars 68 forks source link

Add support for letting client manage the transaction for a migration. #4

Closed hsyed closed 7 years ago

hsyed commented 7 years ago

Thanks for a great job on the driver. I am currently using the migration package directly. I need to manage the transaction a migration runs in as I am creating tenant schemas and stuff has to occur before and after the transactions. I am wondering if there is some way to detect if the connection already has a transaction associated with it -- does the TxStatus byte provide any clues ?.

If not could we get a new constructor NewMigratorNoTX that makes MigrateTo not use a Tx ? Happy to provide a PR.