-
-
Notifications
You must be signed in to change notification settings - Fork 731
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Some properties for RoundhouseSettings in Cake.Common.Tools.Roundhouse are not working properly #1292
Comments
@ferminmoli Everything is there it just isn't working as you would expect. The Drop Boolean in the settings file is internal. So you run the RoundHouseDrop command and it will toggle the Drop setting as part of the runner. Look here at the RoundhouseDrop alias.: https://github.com/cake-build/cake/blob/develop/src/Cake.Common/Tools/Roundhouse/RoundhouseAliases.cs
So you need to run without the drop and it will not execute it: RoundhouseMigrate(new RoundhouseSettings{ As can be seen here: https://github.com/cake-build/cake/blob/develop/src/Cake.Common/Tools/Roundhouse/RoundhouseRunner.cs public void Run(RoundhouseSettings settings, bool drop = false) |
Thanks for your help @phillipsj |
Hmm, this feels like something that should be changed. |
@patriksvensson, yes I'm agree with you. I can't figure out how to extend roundhouse functionality to pass more parameters. At the moment I can only run a simple migration and a Drop database but whole roundhouse functionality is encapsulated inside cake classes. |
@patriksvensson @ferminmoli I agree it isn't intuitive, but having separate commands prevents mistakes as far as drop. I have been wanting to learn more about roundhouse and I don't mind adding the additional that is needed and making that change if you want. |
@phillipsj maybe it can be changed to accept manually parameters to take advantage of whole roundhouse functionality. I'm pretty sure that you have a better idea. |
@ferminmoli I will use some of the other implementations and post back and example for review. |
@phillipsj thanks again for your contribution! |
Error: C:/Examples/Ecommerce/blanqueria/Ecommerce/build.cake(92,4): error CS0117
: 'Cake.Common.Tools.Roundhouse.RoundhouseSettings' does not contain a definitio
n for 'Drop'
I need to drop the database using this command:
RoundhouseMigrate(new RoundhouseSettings{
ConnectionString = connectionString,
SqlFilesDirectory = "Ecommerce\Scripts",
Drop = false
});
Cake version: 0.15.2
Windows 10 64Bits
The text was updated successfully, but these errors were encountered: