-
Notifications
You must be signed in to change notification settings - Fork 0
/
V202410231553__v2.10.Enhance_Integrations_Metadata.sql
222 lines (203 loc) · 6.26 KB
/
V202410231553__v2.10.Enhance_Integrations_Metadata.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
/* SQL text to update existing entities from schema */
EXEC [${flyway:defaultSchema}].spUpdateExistingEntitiesFromSchema @ExcludedSchemaNames='sys,staging'
/* SQL text to delete unneeded entity fields */
EXEC [${flyway:defaultSchema}].spDeleteUnneededEntityFields @ExcludedSchemaNames='sys,staging'
/* SQL text to update existingg entity fields from schema */
EXEC [${flyway:defaultSchema}].spUpdateExistingEntityFieldsFromSchema @ExcludedSchemaNames='sys,staging'
/* SQL text to insert new entity field */
INSERT INTO [${flyway:defaultSchema}].EntityField
(
ID,
EntityID,
Sequence,
Name,
DisplayName,
Description,
Type,
Length,
Precision,
Scale,
AllowsNull,
DefaultValue,
AutoIncrement,
AllowUpdateAPI,
IsVirtual,
RelatedEntityID,
RelatedEntityFieldName,
IsNameField,
IncludeInUserSearchAPI,
IncludeRelatedEntityNameFieldInBaseView,
DefaultInView,
IsPrimaryKey,
IsUnique,
RelatedEntityDisplayType
)
VALUES
(
'7d91381d-abc9-46dd-aa66-3e1909be1cb2',
'E5238F34-2837-EF11-86D4-6045BDEE16E6',
10,
'Status',
'Status',
'Status of the integration run. Possible values: Pending, In Progress, Success, Failed.',
'nvarchar',
40,
0,
0,
0,
'Pending',
0,
1,
0,
NULL,
NULL,
0,
0,
0,
0,
0,
0,
'Search'
)
/* SQL text to insert new entity field */
INSERT INTO [${flyway:defaultSchema}].EntityField
(
ID,
EntityID,
Sequence,
Name,
DisplayName,
Description,
Type,
Length,
Precision,
Scale,
AllowsNull,
DefaultValue,
AutoIncrement,
AllowUpdateAPI,
IsVirtual,
RelatedEntityID,
RelatedEntityFieldName,
IsNameField,
IncludeInUserSearchAPI,
IncludeRelatedEntityNameFieldInBaseView,
DefaultInView,
IsPrimaryKey,
IsUnique,
RelatedEntityDisplayType
)
VALUES
(
'429c9b37-8575-4f2d-9e19-f39378ec3a12',
'E5238F34-2837-EF11-86D4-6045BDEE16E6',
11,
'ErrorLog',
'Error Log',
'Optional error log information for the integration run.',
'nvarchar',
-1,
0,
0,
1,
'null',
0,
1,
0,
NULL,
NULL,
0,
0,
0,
0,
0,
0,
'Search'
)
/* SQL text to insert new entity field */
INSERT INTO [${flyway:defaultSchema}].EntityField
(
ID,
EntityID,
Sequence,
Name,
DisplayName,
Description,
Type,
Length,
Precision,
Scale,
AllowsNull,
DefaultValue,
AutoIncrement,
AllowUpdateAPI,
IsVirtual,
RelatedEntityID,
RelatedEntityFieldName,
IsNameField,
IncludeInUserSearchAPI,
IncludeRelatedEntityNameFieldInBaseView,
DefaultInView,
IsPrimaryKey,
IsUnique,
RelatedEntityDisplayType
)
VALUES
(
'cb3f1399-7741-4882-99d6-f6cde80e3897',
'E5238F34-2837-EF11-86D4-6045BDEE16E6',
12,
'ConfigData',
'Config Data',
'Optional configuration data in JSON format for the request that started the integration run for audit purposes.',
'nvarchar',
-1,
0,
0,
1,
'null',
0,
1,
0,
NULL,
NULL,
0,
0,
0,
0,
0,
0,
'Search'
)
/* SQL text to set default column width where needed */
EXEC ${flyway:defaultSchema}.spSetDefaultColumnWidthWhereNeeded @ExcludedSchemaNames='sys,staging'
/* SQL text to update entity field value sequence */
UPDATE [${flyway:defaultSchema}].EntityFieldValue SET Sequence=1 WHERE ID='C051302D-7236-EF11-86D4-6045BDEE16E6'
/* SQL text to update entity field value sequence */
UPDATE [${flyway:defaultSchema}].EntityFieldValue SET Sequence=3 WHERE ID='BE51302D-7236-EF11-86D4-6045BDEE16E6'
/* SQL text to insert entity field values */
INSERT INTO [${flyway:defaultSchema}].EntityFieldValue
(EntityFieldID, Sequence, Value, Code)
VALUES
('7D91381D-ABC9-46DD-AA66-3E1909BE1CB2', 1, 'Pending', 'Pending')
/* SQL text to insert entity field values */
INSERT INTO [${flyway:defaultSchema}].EntityFieldValue
(EntityFieldID, Sequence, Value, Code)
VALUES
('7D91381D-ABC9-46DD-AA66-3E1909BE1CB2', 2, 'In Progress', 'In Progress')
/* SQL text to insert entity field values */
INSERT INTO [${flyway:defaultSchema}].EntityFieldValue
(EntityFieldID, Sequence, Value, Code)
VALUES
('7D91381D-ABC9-46DD-AA66-3E1909BE1CB2', 3, 'Success', 'Success')
/* SQL text to insert entity field values */
INSERT INTO [${flyway:defaultSchema}].EntityFieldValue
(EntityFieldID, Sequence, Value, Code)
VALUES
('7D91381D-ABC9-46DD-AA66-3E1909BE1CB2', 4, 'Failed', 'Failed')
/* SQL text to update ValueListType for entity field ID 7D91381D-ABC9-46DD-AA66-3E1909BE1CB2 */
UPDATE [${flyway:defaultSchema}].EntityField SET ValueListType='List' WHERE ID='7D91381D-ABC9-46DD-AA66-3E1909BE1CB2'
/* SQL text to update existingg entity fields from schema */
EXEC [${flyway:defaultSchema}].spUpdateExistingEntityFieldsFromSchema @ExcludedSchemaNames='sys,staging'
/* SQL text to set default column width where needed */
EXEC ${flyway:defaultSchema}.spSetDefaultColumnWidthWhereNeeded @ExcludedSchemaNames='sys,staging'