aboutsummaryrefslogtreecommitdiff
path: root/src/xsd/sql.xsd
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/xsd/sql.xsd461
1 files changed, 461 insertions, 0 deletions
diff --git a/src/xsd/sql.xsd b/src/xsd/sql.xsd
new file mode 100644
index 00000000..2c15a66e
--- /dev/null
+++ b/src/xsd/sql.xsd
@@ -0,0 +1,461 @@
1<?xml version="1.0" encoding="utf-8"?>
2<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
3
4
5<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
6 xmlns:xse="http://wixtoolset.org/schemas/XmlSchemaExtension"
7 xmlns:html="http://www.w3.org/1999/xhtml"
8 xmlns:wxs="http://wixtoolset.org/schemas/v4/wxs"
9 targetNamespace="http://wixtoolset.org/schemas/v4/wxs/sql"
10 xmlns="http://wixtoolset.org/schemas/v4/wxs/sql">
11 <xs:annotation>
12 <xs:documentation>
13 The source code schema for the WiX Toolset SQL Server Extension.
14 </xs:documentation>
15 </xs:annotation>
16
17 <xs:import namespace="http://wixtoolset.org/schemas/v4/wxs" />
18
19 <xs:element name="SqlDatabase">
20 <xs:annotation>
21 <xs:appinfo>
22 <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="Component" />
23 <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="Fragment" />
24 <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="Module" />
25 <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="Package" />
26 <xse:remarks>
27 Nesting SqlDatabase under a Component element will result in a SqlDatabase being installed to the machine as the package is installed.
28
29 Nesting SqlDatabase under Package, Fragment, or Module
30 results in a database "locator" record being created in
31 the SqlDatabase table. This means that the database
32 itself is neither installed nor uninstalled by the MSI
33 package. It does make the database available for referencing
34 from a SqlString or SqlScript record. This allows MSI to install
35 SqlScripts or SqlStrings to already existing databases on the machine.
36 The install will fail if the database does not exist in these cases.
37
38 The User attribute references credentials specified in a User element.
39 If a user is not specified then Windows Authentication will be used by default
40 using the credentials of the user performing the install to execute sql
41 strings, etc.
42 </xse:remarks>
43 <xse:seeAlso namespace="http://wixtoolset.org/schemas/v4/wxs/util" ref="User"/>
44 </xs:appinfo>
45 <xs:documentation>SQL Database</xs:documentation>
46 </xs:annotation>
47 <xs:complexType>
48 <xs:choice minOccurs="0" maxOccurs="unbounded">
49 <xs:element ref="SqlFileSpec" />
50 <xs:element ref="SqlLogFileSpec" />
51 <xs:element ref="SqlScript"/>
52 <xs:element ref="SqlString"/>
53 <xs:any namespace="##other" processContents="lax">
54 <xs:annotation>
55 <xs:documentation>
56 Extensibility point in the WiX XML Schema. Schema extensions can register additional
57 elements at this point in the schema.
58 </xs:documentation>
59 </xs:annotation>
60 </xs:any>
61 </xs:choice>
62 <xs:attribute name="Id" type="xs:string">
63 <xs:annotation>
64 <xs:documentation>Unique identifier in your installation package for this database. If an Id is not provided, one will generated for you.</xs:documentation>
65 </xs:annotation>
66 </xs:attribute>
67 <xs:attribute name="Server" type="xs:string" use="required">
68 <xs:annotation>
69 <xs:documentation>Database server name.</xs:documentation>
70 </xs:annotation>
71 </xs:attribute>
72 <xs:attribute name="Instance" type="xs:string">
73 <xs:annotation>
74 <xs:documentation>Optional database server instance.</xs:documentation>
75 </xs:annotation>
76 </xs:attribute>
77 <xs:attribute name="Database" type="xs:string" use="required">
78 <xs:annotation>
79 <xs:documentation>
80 The name of the database. The value can be a literal value or derived from a
81 Property element using the [Formatted](https://learn.microsoft.com/en-us/windows/win32/msi/formatted)
82 syntax.
83 </xs:documentation>
84 </xs:annotation>
85 </xs:attribute>
86 <xs:attribute name="User" type="xs:string">
87 <xs:annotation>
88 <xs:documentation>Optional user used to connect to database.</xs:documentation>
89 </xs:annotation>
90 </xs:attribute>
91 <xs:attribute name="CreateOnInstall" type="wxs:YesNoTypeUnion">
92 <xs:annotation>
93 <xs:documentation>Create the database during installation.</xs:documentation>
94 </xs:annotation>
95 </xs:attribute>
96 <xs:attribute name="CreateOnReinstall" type="wxs:YesNoTypeUnion">
97 <xs:annotation>
98 <xs:documentation>
99 Specifies whether to create the database when the associated component is reinstalled. Setting CreateOnInstall to yes does <html:b>not</html:b> imply CreateOnReinstall is set to yes. CreateOnReinstall must be set in addition to CreateOnInstall for it to be created during both install and reinstall.
100 </xs:documentation>
101 </xs:annotation>
102 </xs:attribute>
103 <xs:attribute name="CreateOnUninstall" type="wxs:YesNoTypeUnion">
104 <xs:annotation>
105 <xs:documentation>Create the database during uninstallation.</xs:documentation>
106 </xs:annotation>
107 </xs:attribute>
108 <xs:attribute name="DropOnInstall" type="wxs:YesNoTypeUnion">
109 <xs:annotation>
110 <xs:documentation>Drop the database during installation.</xs:documentation>
111 </xs:annotation>
112 </xs:attribute>
113 <xs:attribute name="DropOnReinstall" type="wxs:YesNoTypeUnion">
114 <xs:annotation>
115 <xs:documentation>
116 Specifies whether to drop the database when the associated component is reinstalled. Setting DropOnInstall to yes does <html:b>not</html:b> imply DropOnReinstall is set to yes. DropOnReinstall must be set in addition to DropOnInstall for it to be dropped during both install and reinstall.
117 </xs:documentation>
118 </xs:annotation>
119 </xs:attribute>
120 <xs:attribute name="DropOnUninstall" type="wxs:YesNoTypeUnion">
121 <xs:annotation>
122 <xs:documentation>Drop the database during uninstallation.</xs:documentation>
123 </xs:annotation>
124 </xs:attribute>
125 <xs:attribute name="ContinueOnError" type="wxs:YesNoTypeUnion">
126 <xs:annotation>
127 <xs:documentation>Continue even if the database operation fails.</xs:documentation>
128 </xs:annotation>
129 </xs:attribute>
130 <xs:attribute name="ConfirmOverwrite" type="wxs:YesNoTypeUnion">
131 <xs:annotation>
132 <xs:documentation>Prompt the user to overwrite the database.</xs:documentation>
133 </xs:annotation>
134 </xs:attribute>
135 <xs:anyAttribute namespace="##other" processContents="lax">
136 <xs:annotation>
137 <xs:documentation>
138 Extensibility point in the WiX XML Schema. Schema extensions can register additional
139 attributes at this point in the schema.
140 </xs:documentation>
141 </xs:annotation>
142 </xs:anyAttribute>
143 </xs:complexType>
144 </xs:element>
145
146 <xs:element name="SqlFileSpec">
147 <xs:annotation>
148 <xs:documentation>File specification for a Sql database.</xs:documentation>
149 </xs:annotation>
150 <xs:complexType>
151 <xs:choice minOccurs="0" maxOccurs="unbounded">
152 <xs:any namespace="##other" processContents="lax">
153 <xs:annotation>
154 <xs:documentation>
155 Extensibility point in the WiX XML Schema. Schema extensions can register additional
156 elements at this point in the schema.
157 </xs:documentation>
158 </xs:annotation>
159 </xs:any>
160 </xs:choice>
161 <xs:attribute name="Id" use="required" type="xs:string">
162 <xs:annotation>
163 <xs:documentation>Unique identifier in your installation package for this file specification. If an Id is not provided, one will generated for you.</xs:documentation>
164 </xs:annotation>
165 </xs:attribute>
166 <xs:attribute name="Name" type="xs:string">
167 <xs:annotation>
168 <xs:documentation>Specifies the logical name for the database file.</xs:documentation>
169 </xs:annotation>
170 </xs:attribute>
171 <xs:attribute name="Filename" use="required" type="xs:string">
172 <xs:annotation>
173 <xs:documentation>Specifies the operating-system file name for the database file.</xs:documentation>
174 </xs:annotation>
175 </xs:attribute>
176 <xs:attribute name="Size" type="xs:string">
177 <xs:annotation>
178 <xs:documentation>
179 Specifies the size of the database file. The GB, MB and KB suffixes can be used to specify gigabytes,
180 megabytes or kilobytes. The default is megabytes if no suffix is specified. When a Size is not
181 supplied for a database file, SQL Server uses the size of the primary file in the model database.
182 </xs:documentation>
183 </xs:annotation>
184 </xs:attribute>
185 <xs:attribute name="MaxSize" type="xs:string">
186 <xs:annotation>
187 <xs:documentation>
188 Specifies the maximum size to which the database file can grow. The GB, MB and KB suffixes can be used to
189 to specify gigabytes, megabytes or kilobytes. The default is megabytes if no suffix is specified. If
190 MaxSize is not specified, the file will grow until the disk is full.
191 </xs:documentation>
192 </xs:annotation>
193 </xs:attribute>
194 <xs:attribute name="GrowthSize" type="xs:string">
195 <xs:annotation>
196 <xs:documentation>
197 Specifies the growth increment of the database file. The GB, MB and KB and % suffixes can be used to
198 specify gigabytes, megabytes, kilobytes or a percentage of the current file size to grow. The default is
199 megabytes if no suffix is specified. The default value is 10% if GrowthSize is not specified, and the
200 minimum value is 64 KB. The GrowthSize setting for a file cannot exceed the MaxSize setting.
201 </xs:documentation>
202 </xs:annotation>
203 </xs:attribute>
204 <xs:anyAttribute namespace="##other" processContents="lax">
205 <xs:annotation>
206 <xs:documentation>
207 Extensibility point in the WiX XML Schema. Schema extensions can register additional
208 attributes at this point in the schema.
209 </xs:documentation>
210 </xs:annotation>
211 </xs:anyAttribute>
212 </xs:complexType>
213 </xs:element>
214
215 <xs:element name="SqlLogFileSpec">
216 <xs:annotation>
217 <xs:documentation>File specification for a Sql database.</xs:documentation>
218 </xs:annotation>
219 <xs:complexType>
220 <xs:choice minOccurs="0" maxOccurs="unbounded">
221 <xs:any namespace="##other" processContents="lax">
222 <xs:annotation>
223 <xs:documentation>
224 Extensibility point in the WiX XML Schema. Schema extensions can register additional
225 elements at this point in the schema.
226 </xs:documentation>
227 </xs:annotation>
228 </xs:any>
229 </xs:choice>
230 <xs:attribute name="Id" type="xs:string">
231 <xs:annotation>
232 <xs:documentation>Unique identifier in your installation package for this log file specification. If an Id is not provided, one will generated for you.</xs:documentation>
233 </xs:annotation>
234 </xs:attribute>
235 <xs:attribute name="Name" type="xs:string">
236 <xs:annotation>
237 <xs:documentation>Specifies the logical name for the log file.</xs:documentation>
238 </xs:annotation>
239 </xs:attribute>
240 <xs:attribute name="Filename" type="xs:string">
241 <xs:annotation>
242 <xs:documentation>Specifies the operating-system file name for the log file.</xs:documentation>
243 </xs:annotation>
244 </xs:attribute>
245 <xs:attribute name="Size" type="xs:string">
246 <xs:annotation>
247 <xs:documentation>
248 Specifies the size of the log file. The GB, MB and KB suffixes can be used to specify gigabytes,
249 megabytes or kilobytes. The default is megabytes if no suffix is specified. When a Size is not
250 supplied for a log file, SQL Server makes the file 1 MB.
251 </xs:documentation>
252 </xs:annotation>
253 </xs:attribute>
254 <xs:attribute name="MaxSize" type="xs:string">
255 <xs:annotation>
256 <xs:documentation>
257 Specifies the maximum size to which the log file can grow. The GB, MB and KB suffixes can be used to
258 to specify gigabytes, megabytes or kilobytes. The default is megabytes if no suffix is specified. If
259 MaxSize is not specified, the file will grow until the disk is full.
260 </xs:documentation>
261 </xs:annotation>
262 </xs:attribute>
263 <xs:attribute name="GrowthSize" type="xs:string">
264 <xs:annotation>
265 <xs:documentation>
266 Specifies the growth increment of the log file. The GB, MB and KB and % suffixes can be used to
267 specify gigabytes, megabytes, kilobytes or a percentage of the current file size to grow. The default is
268 megabytes if no suffix is specified. The default value is 10% if GrowthSize is not specified, and the
269 minimum value is 64 KB. The GrowthSize setting for a file cannot exceed the MaxSize setting.
270 </xs:documentation>
271 </xs:annotation>
272 </xs:attribute>
273 <xs:anyAttribute namespace="##other" processContents="lax">
274 <xs:annotation>
275 <xs:documentation>
276 Extensibility point in the WiX XML Schema. Schema extensions can register additional
277 attributes at this point in the schema.
278 </xs:documentation>
279 </xs:annotation>
280 </xs:anyAttribute>
281 </xs:complexType>
282 </xs:element>
283
284 <xs:element name="SqlScript">
285 <xs:annotation>
286 <xs:appinfo>
287 <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="Component" />
288 </xs:appinfo>
289 <xs:documentation>SQL Script</xs:documentation>
290 </xs:annotation>
291 <xs:complexType>
292 <xs:choice minOccurs="0" maxOccurs="unbounded">
293 <xs:any namespace="##other" processContents="lax">
294 <xs:annotation>
295 <xs:documentation>
296 Extensibility point in the WiX XML Schema. Schema extensions can register additional
297 elements at this point in the schema.
298 </xs:documentation>
299 </xs:annotation>
300 </xs:any>
301 </xs:choice>
302 <xs:attribute name="Id" type="xs:string">
303 <xs:annotation>
304 <xs:documentation>Unique identifier in your installation package for this sql script. If an Id is not provided, one will generated for you.</xs:documentation>
305 </xs:annotation>
306 </xs:attribute>
307 <xs:attribute name="SqlDb" type="xs:string">
308 <xs:annotation>
309 <xs:documentation>Id of the SqlDatabase to execute the script against. Required when not child of SqlDatabase.</xs:documentation>
310 </xs:annotation>
311 </xs:attribute>
312 <xs:attribute name="User" type="xs:string">
313 <xs:annotation>
314 <xs:documentation>Optional user used to connect to database.</xs:documentation>
315 </xs:annotation>
316 </xs:attribute>
317 <xs:attribute name="BinaryRef" type="xs:string" use="required">
318 <xs:annotation>
319 <xs:documentation>Reference to Binary stream that contains the SQL script to execute.</xs:documentation>
320 </xs:annotation>
321 </xs:attribute>
322 <xs:attribute name="ExecuteOnInstall" type="wxs:YesNoTypeUnion">
323 <xs:annotation>
324 <xs:documentation>Specifies to execute the script when the associated component is installed. This attribute is mutually exclusive with the RollbackOnInstall, RollbackOnReinstall and RollbackOnUninstall attributes.</xs:documentation>
325 </xs:annotation>
326 </xs:attribute>
327 <xs:attribute name="ExecuteOnReinstall" type="wxs:YesNoTypeUnion">
328 <xs:annotation>
329 <xs:documentation>Specifies whether to execute the script when the associated component is reinstalled. Setting ExecuteOnInstall to yes does <html:b>not</html:b> imply ExecuteOnReinstall is set to yes. ExecuteOnReinstall must be set in addition to ExecuteOnInstall for it to be executed during both install and reinstall. This attribute is mutually exclusive with the RollbackOnInstall, RollbackOnReinstall and RollbackOnUninstall attributes.</xs:documentation>
330 </xs:annotation>
331 </xs:attribute>
332 <xs:attribute name="ExecuteOnUninstall" type="wxs:YesNoTypeUnion">
333 <xs:annotation>
334 <xs:documentation>Specifies to execute the script when the associated component is uninstalled. This attribute is mutually exclusive with the RollbackOnInstall, RollbackOnReinstall and RollbackOnUninstall attributes.</xs:documentation>
335 </xs:annotation>
336 </xs:attribute>
337 <xs:attribute name="RollbackOnInstall" type="wxs:YesNoTypeUnion">
338 <xs:annotation>
339 <xs:documentation>Specifies whether to execute the script on rollback if an attempt is made to install the associated component. This attribute is mutually exclusive with the ExecuteOnInstall, ExecuteOnReinstall and ExecuteOnUninstall attributes.</xs:documentation>
340 </xs:annotation>
341 </xs:attribute>
342 <xs:attribute name="RollbackOnReinstall" type="wxs:YesNoTypeUnion">
343 <xs:annotation>
344 <xs:documentation>Specifies whether to execute the script on rollback if an attempt is made to reinstall the associated component. This attribute is mutually exclusive with the ExecuteOnInstall, ExecuteOnReinstall and ExecuteOnUninstall attributes.</xs:documentation>
345 </xs:annotation>
346 </xs:attribute>
347 <xs:attribute name="RollbackOnUninstall" type="wxs:YesNoTypeUnion">
348 <xs:annotation>
349 <xs:documentation>Specifies whether to execute the script on rollback if an attempt is made to uninstall the associated component. This attribute is mutually exclusive with the ExecuteOnInstall, ExecuteOnReinstall and ExecuteOnUninstall attributes.</xs:documentation>
350 </xs:annotation>
351 </xs:attribute>
352 <xs:attribute name="ContinueOnError" type="wxs:YesNoTypeUnion">
353 <xs:annotation>
354 <xs:documentation>Continue executing scripts even if this one fails.</xs:documentation>
355 </xs:annotation>
356 </xs:attribute>
357 <xs:attribute name="Sequence" type="wxs:Integer">
358 <xs:annotation>
359 <xs:documentation>Specifes the order to run the SQL Scripts. It is recommended that rollback scripts be scheduled before their complementary execution script. This order is also relative across the SqlString element.</xs:documentation>
360 </xs:annotation>
361 </xs:attribute>
362 <xs:anyAttribute namespace="##other" processContents="lax">
363 <xs:annotation>
364 <xs:documentation>
365 Extensibility point in the WiX XML Schema. Schema extensions can register additional
366 attributes at this point in the schema.
367 </xs:documentation>
368 </xs:annotation>
369 </xs:anyAttribute>
370 </xs:complexType>
371 </xs:element>
372
373 <xs:element name="SqlString">
374 <xs:annotation>
375 <xs:appinfo>
376 <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="Component" />
377 </xs:appinfo>
378 <xs:documentation>SQL String</xs:documentation>
379 </xs:annotation>
380 <xs:complexType>
381 <xs:choice minOccurs="0" maxOccurs="unbounded">
382 <xs:any namespace="##other" processContents="lax">
383 <xs:annotation>
384 <xs:documentation>
385 Extensibility point in the WiX XML Schema. Schema extensions can register additional
386 elements at this point in the schema.
387 </xs:documentation>
388 </xs:annotation>
389 </xs:any>
390 </xs:choice>
391 <xs:attribute name="Id" type="xs:string">
392 <xs:annotation>
393 <xs:documentation>Unique identifier in your installation package for this sql command. If an Id is not provided, one will generated for you.</xs:documentation>
394 </xs:annotation>
395 </xs:attribute>
396 <xs:attribute name="SqlDb" type="xs:string">
397 <xs:annotation>
398 <xs:documentation>Id of the SqlDatabase to execute the script against. Required when not child of SqlDatabase.</xs:documentation>
399 </xs:annotation>
400 </xs:attribute>
401 <xs:attribute name="User" type="xs:string">
402 <xs:annotation>
403 <xs:documentation>Optional user used to connect to database.</xs:documentation>
404 </xs:annotation>
405 </xs:attribute>
406 <xs:attribute name="SQL" type="xs:string" use="required">
407 <xs:annotation>
408 <xs:documentation>SQL command to execute against the database.</xs:documentation>
409 </xs:annotation>
410 </xs:attribute>
411 <xs:attribute name="ExecuteOnInstall" type="wxs:YesNoTypeUnion">
412 <xs:annotation>
413 <xs:documentation>Specifies to execute the string when the associated component is installed. This attribute is mutually exclusive with the RollbackOnInstall, RollbackOnReinstall and RollbackOnUninstall attributes.</xs:documentation>
414 </xs:annotation>
415 </xs:attribute>
416 <xs:attribute name="ExecuteOnReinstall" type="wxs:YesNoTypeUnion">
417 <xs:annotation>
418 <xs:documentation>Specifies whether to execute the string when the associated component is reinstalled. Setting ExecuteOnInstall to yes does <html:b>not</html:b> imply ExecuteOnReinstall is set to yes. ExecuteOnReinstall must be set in addition to ExecuteOnInstall for it to be executed during both install and reinstall. This attribute is mutually exclusive with the RollbackOnInstall, RollbackOnReinstall and RollbackOnUninstall attributes.</xs:documentation>
419 </xs:annotation>
420 </xs:attribute>
421 <xs:attribute name="ExecuteOnUninstall" type="wxs:YesNoTypeUnion">
422 <xs:annotation>
423 <xs:documentation>Specifies to execute the string when the associated component is uninstalled. This attribute is mutually exclusive with the RollbackOnInstall, RollbackOnReinstall and RollbackOnUninstall attributes.</xs:documentation>
424 </xs:annotation>
425 </xs:attribute>
426 <xs:attribute name="RollbackOnInstall" type="wxs:YesNoTypeUnion">
427 <xs:annotation>
428 <xs:documentation>Specifies whether to execute the string on rollback if an attempt is made to install the associated component. This attribute is mutually exclusive with the ExecuteOnInstall, ExecuteOnReinstall and ExecuteOnUninstall attributes.</xs:documentation>
429 </xs:annotation>
430 </xs:attribute>
431 <xs:attribute name="RollbackOnReinstall" type="wxs:YesNoTypeUnion">
432 <xs:annotation>
433 <xs:documentation>Specifies whether to execute the string on rollback if an attempt is made to reinstall the associated component. This attribute is mutually exclusive with the ExecuteOnInstall, ExecuteOnReinstall and ExecuteOnUninstall attributes.</xs:documentation>
434 </xs:annotation>
435 </xs:attribute>
436 <xs:attribute name="RollbackOnUninstall" type="wxs:YesNoTypeUnion">
437 <xs:annotation>
438 <xs:documentation>Specifies whether to execute the string on rollback if an attempt is made to uninstall the associated component. This attribute is mutually exclusive with the ExecuteOnInstall, ExecuteOnReinstall and ExecuteOnUninstall attributes.</xs:documentation>
439 </xs:annotation>
440 </xs:attribute>
441 <xs:attribute name="ContinueOnError" type="wxs:YesNoTypeUnion">
442 <xs:annotation>
443 <xs:documentation>Continue executing strings even if this one fails.</xs:documentation>
444 </xs:annotation>
445 </xs:attribute>
446 <xs:attribute name="Sequence" type="wxs:Integer">
447 <xs:annotation>
448 <xs:documentation>Specifes the order to run the SQL Strings. It is recommended that rollback strings be scheduled before their complementary execution string. This order is also relative across the SqlScript element.</xs:documentation>
449 </xs:annotation>
450 </xs:attribute>
451 <xs:anyAttribute namespace="##other" processContents="lax">
452 <xs:annotation>
453 <xs:documentation>
454 Extensibility point in the WiX XML Schema. Schema extensions can register additional
455 attributes at this point in the schema.
456 </xs:documentation>
457 </xs:annotation>
458 </xs:anyAttribute>
459 </xs:complexType>
460 </xs:element>
461</xs:schema>