Skip to content

Commit

Permalink
Removed date selection
Browse files Browse the repository at this point in the history
Added section for finance. Can be used for other types that support max
  • Loading branch information
sstad committed Feb 5, 2019
1 parent e3a71f5 commit 6ec4f16
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
Binary file modified bin/dbatools.dll
Binary file not shown.
18 changes: 17 additions & 1 deletion functions/Invoke-DbaDbDataMasking.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -481,14 +481,30 @@ function Invoke-DbaDbDataMasking {
$faker.System.Random.Bool()
}
{
$psitem -in 'address', 'commerce', 'company', 'context', 'database', 'date', 'finance', 'hacker', 'hashids', 'image', 'internet', 'lorem', 'name', 'person', 'phone', 'random', 'rant', 'system'
$psitem -in 'address', 'commerce', 'company', 'context', 'database', 'finance', 'hacker', 'hashids', 'image', 'internet', 'lorem', 'name', 'person', 'phone', 'random', 'rant', 'system'
} {
if ($columnobject.Format) {
$faker.$($columnobject.MaskingType).$($columnobject.SubType)("$($columnobject.Format)")
} else {
$faker.$($columnobject.MaskingType).$($columnobject.SubType)()
}
}
{
$psitem -in 'finance'
} {
if ($columnobject.Format) {
$faker.$($columnobject.MaskingType).$($columnobject.SubType)("$($columnobject.Format)")
}
else {
try{
$faker.$($columnobject.MaskingType).$($columnobject.SubType)($max)
}
catch{
$faker.$($columnobject.MaskingType).$($columnobject.SubType)()
}

}
}
default {
if ($max -eq -1) {
$max = 1024
Expand Down

0 comments on commit 6ec4f16

Please sign in to comment.