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

Added the ability to set the default database to Set-DbaLogin #4930

Merged
merged 2 commits into from Jan 10, 2019

Conversation

Projects
None yet
3 participants
@mikefrobbins
Copy link
Contributor

mikefrobbins commented Jan 10, 2019

Type of Change

  • Bug fix (non-breaking change, fixes #)
  • New feature (non-breaking change, adds functionality)
  • Breaking change (effects multiple commands or functionality)
  • Ran manual Pester test and has passed (`.\tests\manual.pester.ps1)
  • Adding code coverage to existing functionality
  • Pester test is included
  • If new file reference added for test, has is been added to github.com/sqlcollaborative/appveyor-lab ?
  • Nunit test is included
  • Documentation
  • Build system

Adds the ability to set the default database with the Set-DbaLogin command.

Adds a DefaultDatabase parameter and help based off of the DefaultDatabase parameter from New-DbaLogin.

See the help for how to use this new parameter.

image

The databases variable contains a list of databases on the specified SQL Server. The command shown in the image sets the default database to master for all users who are set to a database that does not exist.

@potatoqualitee

This comment has been minimized.

Copy link
Member

potatoqualitee commented Jan 10, 2019

heyyy! great to see you here, Mike! 💯

@potatoqualitee
Copy link
Member

potatoqualitee left a comment

everything looks great! docs, examples, test-bound, the whole 9 yards, thanks a bunch 👍

@@ -152,6 +160,8 @@ function Set-DbaLogin {
[string[]]$Login,
[Alias("Password")]
[object]$SecurePassword, #object so that it can accept credential or securestring
[Alias("DefaulDB")]

This comment has been minimized.

@shaneis

shaneis Jan 10, 2019

Contributor

I only say this cause I was looking at typos and saw the tweet at the same time. You're missing a 't' in 'DefaultDB'

Suggested change Beta
[Alias("DefaulDB")]
[Alias("DefaultDB")]

This comment has been minimized.

@potatoqualitee

potatoqualitee Jan 10, 2019

Member

Thanks for the catch, @shaneis !

This comment has been minimized.

@mikefrobbins

mikefrobbins Jan 10, 2019

Author Contributor

I wanted to make sure the spelling and casing of the parameter and its alias matched the rest of the project so I copy and pasted it from New-DbaLogin which evidently has the same typo.

@potatoqualitee

This comment has been minimized.

Copy link
Member

potatoqualitee commented Jan 10, 2019

Ahh, there is one failure, Mike. We use the OTSB style which is set for VS Code users, but not if you use another editor (so i understand, i use another editor ;). You can execute Invoke-DbatoolsFormatter against Set-DbaLogin.ps1

Also, I'm not sure why the Set-DbaLogin.Tests.ps1 passed, the parameter unit tests must be updated. I can do both of these if you like, Mike. Otherwise, please update and I'll merge on pass tests 👍

@mikefrobbins

This comment has been minimized.

Copy link
Contributor Author

mikefrobbins commented Jan 10, 2019

Requested changes submitted.

@mikefrobbins

This comment has been minimized.

Copy link
Contributor Author

mikefrobbins commented Jan 10, 2019

I do use VS Code.

Note to self: the code style only applies in VS Code if you open the project (a folder). It does not apply when you open a single file.

@potatoqualitee

This comment has been minimized.

Copy link
Member

potatoqualitee commented Jan 10, 2019

awesome, thank you! also good to note about the single file, i'll keep that in mind when i write about vs code.

@potatoqualitee potatoqualitee merged commit d0a2f99 into sqlcollaborative:development Jan 10, 2019

1 check passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
@shaneis

This comment has been minimized.

Copy link
Contributor

shaneis commented Jan 10, 2019

@potatoqualitee

This comment has been minimized.

Copy link
Member

potatoqualitee commented Jan 10, 2019

@shaneis - PR from Mike is in and merged! 💯

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