Skip to content

Commit c65acdf

Browse files
sanderstadpotatoqualitee
authored andcommitted
Fix masking commands (#5071)
* Added check for unique indexes * Added procedure to make up what the unique indexes are build with Added check if excluded column is in a unique index * Added table * Added extra options for data generation * Removed unused rowcount Added unique value dictionary creation * Added format for masking types * Added support for using formatting of values * Added check if any masking info is present * Implemented unique index support * Renamed variable * Revert "Renamed variable" This reverts commit 3f7adb8. * Renamed variable and applied formatiing * Fixed errors in unique value generation * Added variable for the unique value columns Changed the if statement for the unique columns * Explicitly reset the new value variable * Moved variables to make sure they get cleared in the loop * Removed date selection Added section for finance. Can be used for other types that support max * Revert "Removed date selection" This reverts commit 6ec4f16. * Added section for support of max * Added part for finance * Removed finance from other section * Changed if statement to switch * Changed switch back to if statement Removed sections Added finance to other section * Removed section for finance * Added checks for supported data types, masking types and sub types * Moved retrieval of method and properties to begin Changed if statements for types * Changed message of unsupported types * Added new known types Added format key to known types * Added extra known types * Implemented support for text and ntext data types * Added ntext and text data types * Added decimal data type * Moved data retrieval down * Added types and synonyms Rearranged the types to be in alphabetical order * Added types * Added types to automatically assign the right maskingtype * Improved the check for supported data types * Fixed bug missing curly bracket * Moved the retrieval of the data Implemented selective columns for data retrieval * Changed back to SELECT * instead of selective columns * Changed the SELECT * to be selective columns from table and not object * Moved data retrieval Changed where statement build-up * Removed debug query outputs * Moved where build-up * Added special conversion to date and datetime columns * Fixed bug with missing comma * Added error record * Removed unneccesary if statement Fixed bug with TEXT and NTEXT cast in WHERE clause * Implemented handling of temporal values generation Formatted code * Fixed bool handling * Added decimal type * Added fax synonyms * Fixed bool handling * Updates test should statement * Changed back the should statement * Enabled rdp * Changed rdp password * Formatted test * Reset appveyor.yml to original settings * Changed instance * Changed instance * Changed instance back * Added credential * 0.9.773 * change instance * Make Backup-DbaDatabase use Database and ExcludeDatabase when piping (#5069) * fixes #5044 * fix one test * in instead of contains * 0.9.773 changelog (#5118) * Pass Login values to Copy-DbaLogin (#5120) Call to `Copy-DbaLogin` simply didn't pass the values. Fixes #5119 * Updated test to use other instance * Enabled RDP * Set RDP to be started before tests * Removed RDP option again * Added fix for datetime * Formatted code * Added extra check for temporal tables * Changed test back to 2008 instance
1 parent 8264f68 commit c65acdf

6 files changed

+509
-86
lines changed

appveyor.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ shallow_clone: true
2424
environment:
2525
environment: development
2626
version: 0.9.$(appveyor_build_number)
27-
#appveyor_rdp_password: 2odCuiKmYiem
27+
appveyor_rdp_password: 2odCuiKmYiem
2828
azurepasswd:
2929
secure: ZnF3fWSDfHraMCWlHaekvWrXf3sDqY5M28HMK4236PBbNSoqP29wEhsWMQioSSYGomzgIp9vuiwR8Fc9ViNLoqq0bVcErxEojBFTaPMEzOg2ZwO9OnOTiuUEc5JkoLBv6rEBBWef/DvkFfhr1r0K0xQu6OAPYHVTCRajTZbBRNfCTUM2X2o41t+cSa7681rtnJQnB/8cAfVVnPtJ+97s8w==
3030
azurelegacypasswd:

bin/datamasking/columntypes.json

+88-29
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,54 @@
11
[
22
{
3-
"TypeName": "Firstname",
3+
"TypeName": "Address",
44
"Synonym": [
5-
"Firstname",
6-
"Forename"
5+
"Address",
6+
"Location",
7+
"Headquarters",
8+
"Street"
79
]
810
},
911
{
10-
"TypeName": "Lastname",
12+
"TypeName": "Bic",
1113
"Synonym": [
12-
"Lastname",
13-
"Surname"
14+
"Bic",
15+
"BicAddress"
1416
]
1517
},
1618
{
17-
"TypeName": "Fullname",
19+
"TypeName": "Bitcoin",
1820
"Synonym": [
19-
"Fullname",
20-
"TypeName"
21+
"Bitcoin",
22+
"BitcoinAddress"
2123
]
2224
},
2325
{
24-
"TypeName": "Phone",
26+
"TypeName": "Email",
2527
"Synonym": [
26-
"Phonenumber",
27-
"Phone",
28-
"Telephone",
29-
"TelephoneNumber"
28+
"Email",
29+
"E-mail",
30+
"EmailAddress"
3031
]
3132
},
3233
{
33-
"TypeName": "Address",
34+
"TypeName": "Ethereum",
3435
"Synonym": [
35-
"Address",
36-
"Location",
37-
"Headquarters",
38-
"Street"
36+
"Ethereum",
37+
"EthereumAddress"
3938
]
4039
},
4140
{
42-
"TypeName": "Zipcode",
41+
"TypeName": "Creditcard",
4342
"Synonym": [
44-
"Zipcode",
45-
"Zip",
46-
"Postalcode"
43+
"Creditcard",
44+
"CreditcardNumber"
45+
]
46+
},
47+
{
48+
"TypeName": "CreditcardCVV",
49+
"Synonym": [
50+
"Cvv",
51+
"CreditcardCvv"
4752
]
4853
},
4954
{
@@ -53,9 +58,10 @@
5358
]
5459
},
5560
{
56-
"TypeName": "State",
61+
"TypeName": "Company",
5762
"Synonym": [
58-
"State"
63+
"Company",
64+
"CompanyName"
5965
]
6066
},
6167
{
@@ -70,6 +76,34 @@
7076
"CountryCode"
7177
]
7278
},
79+
{
80+
"TypeName": "Firstname",
81+
"Synonym": [
82+
"Firstname",
83+
"Forename"
84+
]
85+
},
86+
{
87+
"TypeName": "Fullname",
88+
"Synonym": [
89+
"Fullname",
90+
"TypeName"
91+
]
92+
},
93+
{
94+
"TypeName": "Iban",
95+
"Synonym": [
96+
"Iban",
97+
"IbanNumber"
98+
]
99+
},
100+
{
101+
"TypeName": "Lastname",
102+
"Synonym": [
103+
"Lastname",
104+
"Surname"
105+
]
106+
},
73107
{
74108
"TypeName": "Latitude",
75109
"Synonym": [
@@ -85,19 +119,44 @@
85119
]
86120
},
87121
{
88-
"TypeName": "Creditcard",
122+
"TypeName": "Phone",
89123
"Synonym": [
90-
"Creditcard",
91-
"CreditcardNumber"
124+
"Fax",
125+
"FaxNumber",
126+
"Phonenumber",
127+
"Phone",
128+
"Telephone",
129+
"TelephoneNumber"
130+
]
131+
},
132+
{
133+
"TypeName": "State",
134+
"Synonym": [
135+
"State"
136+
]
137+
},
138+
{
139+
"TypeName": "StateAbbr",
140+
"Synonym": [
141+
"StateAbbreviation",
142+
"StateCode"
92143
]
93144
},
94145
{
95146
"TypeName": "Username",
96147
"Synonym": [
97148
"Login",
98-
"LoginId",
149+
"LoginId",
99150
"User",
100151
"UserId"
101152
]
153+
},
154+
{
155+
"TypeName": "Zipcode",
156+
"Synonym": [
157+
"Zipcode",
158+
"Zip",
159+
"Postalcode"
160+
]
102161
}
103162
]

0 commit comments

Comments
 (0)