@@ -27,41 +27,59 @@ BEGIN TRY
27
27
INNER JOIN [cms_agents].[CertStores] [cs] ON [csii].[CertStoreId] = [cs].[Id]
28
28
INNER JOIN @IISStoreTypeIds [sti] ON [sti].[Id] = [cs].[CertStoreType];
29
29
30
+ DELETE [csmj]
31
+ FROM [cms_agents].[CertStoreManagementJobs] [csmj]
32
+ INNER JOIN [cms_agents].[AgentSchedules] [as] ON [csmj].[JobId] = [as].[JobId]
33
+ INNER JOIN @IISJobTypeIds [jti] ON [jti].[Id] = [as].[JobTypeId];
34
+
35
+ DELETE [csms]
36
+ FROM [dbo].[CertStoreManagementStaging] [csms]
37
+ INNER JOIN [cms_agents].[CertStores] [cs] ON [csms].[CertStoreId] = [cs].[Id]
38
+ INNER JOIN @IISStoreTypeIds [sti] ON [sti].[Id] = [cs].[CertStoreType];
39
+
40
+ DELETE [csmjs]
41
+ FROM [cms_agents].[CertStoreManagementJobStaging] [csmjs]
42
+ INNER JOIN [cms_agents].[CertStores] [cs] ON [csmjs].[StoreId] = [cs].[Id]
43
+ INNER JOIN @IISStoreTypeIds [st] ON [st].[Id] = [cs].[CertStoreType];
44
+
45
+ DELETE [csrj]
46
+ FROM [cms_agents].[CertStoreReenrollmentJobs] [csrj]
47
+ INNER JOIN [cms_agents].[AgentSchedules] [as] ON [csrj].[JobId] = [as].[JobId]
48
+ INNER JOIN @IISJobTypeIds [jti] ON [jti].[Id] = [as].[JobTypeId];
49
+
30
50
DELETE [cs]
31
51
FROM [cms_agents].[CertStores] [cs]
32
52
INNER JOIN @IISStoreTypeIds [st] ON [cs].[CertStoreType] = [st].[Id];
33
53
34
54
DELETE [csc]
35
55
FROM [cms_agents].[CertStoreContainers] [csc]
36
- INNER JOIN @IISStoreTypeIds [st] ON [csc].[CertStoreType] = [st].[Id];
56
+ INNER JOIN @IISStoreTypeIds [st] ON [csc].[CertStoreType] = [st].[Id];
37
57
38
58
DELETE [csij]
39
59
FROM [cms_agents].[CertStoreInventoryJobs] [csij]
40
60
INNER JOIN [cms_agents].[AgentSchedules] [as] ON [csij].[JobId] = [as].[JobId]
41
61
INNER JOIN @IISJobTypeIds [jti] ON [jti].[Id] = [as].[JobTypeId];
42
62
43
- DELETE [csrj]
44
- FROM [cms_agents].[CertStoreReenrollmentJobs] [csrj]
45
- INNER JOIN [cms_agents].[AgentSchedules] [as] ON [csrj].[JobId] = [as].[JobId]
46
- INNER JOIN @IISJobTypeIds [jti] ON [jti].[Id] = [as].[JobTypeId];
47
-
48
- DELETE [csmj]
49
- FROM [cms_agents].[CertStoreManagementJobs] [csmj]
50
- INNER JOIN [cms_agents].[AgentSchedules] [as] ON [csmj].[JobId] = [as].[JobId]
51
- INNER JOIN @IISJobTypeIds [jti] ON [jti].[Id] = [as].[JobTypeId];
52
-
53
63
DELETE [as]
54
64
FROM [cms_agents].[AgentSchedules] [as]
55
65
INNER JOIN @IISJobTypeIds [jt] ON [jt].[Id] = [as].[JobTypeId];
56
66
57
67
DELETE [cstp]
58
68
FROM [cms_agents].[CertStoreTypeProperties] [cstp]
59
- INNER JOIN @IISStoreTypeIds [st] ON [cstp].[StoreTypeId] = [st].[id];
69
+ INNER JOIN @IISStoreTypeIds [st] ON [cstp].[StoreTypeId] = [st].[Id];
70
+
71
+ DELETE [cstep]
72
+ FROM [cms_agents].[CertStoreTypeEntryParameters] [cstep]
73
+ INNER JOIN @IISStoreTypeIds [st] ON [cstep].[StoreTypeId] = [st].[Id];
60
74
61
75
DELETE [cst]
62
76
FROM [cms_agents].[CertStoreTypes] [cst]
63
77
INNER JOIN @IISStoreTypeIds [st] ON [cst].[StoreType] = [st].[id];
64
78
79
+ DELETE [arg]
80
+ FROM [cms_agents].[AgentRegistrationGroups] [arg]
81
+ INNER JOIN @IISJobTypeIds [jt] ON [arg].[JobTypeId] = [jt].[Id];
82
+
65
83
DELETE [ars]
66
84
FROM [cms_agents].[AgentRegistrationSettings] [ars]
67
85
INNER JOIN @IISJobTypeIds [jt] ON [ars].[JobTypeId] = [jt].[Id];
@@ -70,6 +88,10 @@ BEGIN TRY
70
88
FROM [cms_agents].[AgentCapabilities] [ac]
71
89
INNER JOIN @IISJobTypeIds [jt] ON [ac].[JobTypeId] = [jt].[Id];
72
90
91
+ DELETE [jtf]
92
+ FROM [cms_agents].[JobTypeFields] [jtf]
93
+ INNER JOIN @IISJobTypeIds [jt] ON [jtf].[JobTypeId] = [jt].[Id];
94
+
73
95
DELETE [jt]
74
96
FROM [cms_agents].[JobTypes] [jt]
75
97
INNER JOIN @IISJobTypeIds [jti] ON [jt].[Id] = [jti].[Id];
0 commit comments