Skip to content

Conversation

@attilaszasz
Copy link

Added option to use connection string from App.config with default to first connection string.

@bretcope
Copy link
Owner

bretcope commented May 1, 2017

Sorry, I blanked on this. I'll try to remember to look tonight.

@bretcope
Copy link
Owner

bretcope commented May 5, 2017

I took a look, but unfortunately I think I'm not going to accept this as-is. The main reason is that I don't like the mayflower.exe.config file. I take it that's where you intend to have people put their connection strings. Having that be part of the distribution will be confusing because users are likely to overwrite a previous config.

I'd be more willing to accept the ability to point Mayflower at a config file, which I think has more use cases anyway.

I also don't like the behavior where the CLI defaults to migrating whatever the first connection is in .config if you don't explicitly tell it to do anything else. If you don't tell the CLI to do anything, it shouldn't do anything.

There are some other minor reasons for not accepting as well:

  • The line if (string.IsNullOrEmpty(ConnectionString) == string.IsNullOrEmpty(Database)) (which was removed) was intended to enforce an XOR. The remaining logic appears to be just an OR now.
  • You've changed exit behavior, which I can kind of understand and I'm happy to discuss, but it has nothing to do with reading from a config file.
  • There are changes to logging which, again, could be discussed, but have nothing to do with reading from a config file.

If you like the setup that you've created, I would encourage you to keep using it, even though I'm not accepting it. There's probably won't be any more substantial updates to this version of Mayflower. I've been off and on working on a completely redesigned Mayflower (in the redesign branch). I might not even call it Mayflower since it's going to be so different. However, it's super low priority for me at the moment. Bottom line, use whatever works for you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants