You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now setup options are being conflated with command options. For example, "UseGlobalTransaction" is not relevant if you're only looking to get a count of outstanding migrations. It's specific to the command you're running. Whereas "MigrationsTable" is relevant to any command, so it's more of a setup option.
I'd like to rework Mayflower such that the Options object only contains setup properties. These are:
ConnectionString
Database
Server
Directory
MigrationsTable
Output
AutoRunPrefixes
Provider (not actually settable currently)
Verbosity (planned feature)
The Output option is a bit ambiguous as to whether it's a setup or a command option. I'm leaning more towards setup, for simplicity.
Current properties which would be removed from the Options class:
CommandTimeout
IsPreview
UseGlobalTransaction
Force
The Migrator object would be refactored to allow it to be constructed directly using an Options argument, then you could run as many commands on it as you want. Each command would correspond to an instance method on Migrator, and would accept parameters as the command options, rather than having a dedicated Options class for each command.
Furthermore, the CLI would be refactored to better support adding commands in the future. Each command will accept any of the setup arguments, but may also have its own arguments which are specific to that command. The first argument must always be a command, such as "migrate" or "status".
The text was updated successfully, but these errors were encountered:
After giving it a little bit more thought, I'm going to move the connection options out of the Migrator constructor as well. The basic idea is that I'd like you to be able to construct the migrator, and then run various commands with one or more databases.
Right now setup options are being conflated with command options. For example, "UseGlobalTransaction" is not relevant if you're only looking to get a count of outstanding migrations. It's specific to the command you're running. Whereas "MigrationsTable" is relevant to any command, so it's more of a setup option.
I'd like to rework Mayflower such that the
Options
object only contains setup properties. These are:Current properties which would be removed from the Options class:
The
Migrator
object would be refactored to allow it to be constructed directly using anOptions
argument, then you could run as many commands on it as you want. Each command would correspond to an instance method on Migrator, and would accept parameters as the command options, rather than having a dedicated Options class for each command.Furthermore, the CLI would be refactored to better support adding commands in the future. Each command will accept any of the setup arguments, but may also have its own arguments which are specific to that command. The first argument must always be a command, such as "migrate" or "status".
The text was updated successfully, but these errors were encountered: