~jterrell/nunitv2/nunitv2

« back to all changes in this revision

Viewing changes to tools/WiX/doc/sql.xsd

  • Committer: Charlie Poole
  • Date: 2012-02-02 01:55:11 UTC
  • mfrom: (3368.1.11 work)
  • Revision ID: charlie@nunit.org-20120202015511-0sspxs5miu16uzse
Merge changes from trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?xml version="1.0" encoding="utf-8"?>
 
2
<xs:schema xmlns:html="http://www.w3.org/1999/xhtml"
 
3
            xmlns:wix="http://schemas.microsoft.com/wix/2006/wi"
 
4
             xmlns:xs="http://www.w3.org/2001/XMLSchema"
 
5
            xmlns:xse="http://schemas.microsoft.com/wix/2005/XmlSchemaExtension"
 
6
      targetNamespace="http://schemas.microsoft.com/wix/SqlExtension"
 
7
                xmlns="http://schemas.microsoft.com/wix/SqlExtension">
 
8
    <xs:annotation>
 
9
        <xs:documentation>
 
10
            Copyright (c) Microsoft Corporation.  All rights reserved.
 
11
            
 
12
            The use and distribution terms for this software are covered by the
 
13
            Common Public License 1.0 (http://opensource.org/licenses/cpl1.0.php)
 
14
            which can be found in the file CPL.TXT at the root of this distribution.
 
15
            By using this software in any fashion, you are agreeing to be bound by
 
16
            the terms of this license.
 
17
            
 
18
            You must not remove this notice, or any other, from this software.
 
19
 
 
20
            The source code schema for the Windows Installer XML Toolset SQL Server Extension.
 
21
        </xs:documentation>
 
22
    </xs:annotation>
 
23
 
 
24
    <xs:import namespace="http://schemas.microsoft.com/wix/2006/wi" />
 
25
 
 
26
    <xs:element name="SqlDatabase">
 
27
        <xs:annotation>
 
28
            <xs:appinfo>
 
29
                <xse:parent namespace="http://schemas.microsoft.com/wix/2006/wi" ref="Component" />
 
30
                <xse:parent namespace="http://schemas.microsoft.com/wix/2006/wi" ref="Fragment" />
 
31
                <xse:parent namespace="http://schemas.microsoft.com/wix/2006/wi" ref="Module" />
 
32
                <xse:parent namespace="http://schemas.microsoft.com/wix/2006/wi" ref="Product" />
 
33
                <xse:remarks>
 
34
                    <html:dl>
 
35
                        <html:dd>Nesting SqlDatabase under a Component element will result in a SqlDatabase being installed to the machine as the package is installed.</html:dd>
 
36
                        <html:dd>
 
37
                            Nesting SqlDatabase under Product, Fragment, or Module
 
38
                            results in a database "locator" record being created in
 
39
                            the SqlDatabase table.  This means that the database
 
40
                            itself is neither installed nor uninstalled by the MSI
 
41
                            package.  It does make the database available for referencing
 
42
                            from a SqlString or SqlScript record.  This allows MSI to install
 
43
                            SqlScripts or SqlStrings to already existing databases on the machine.
 
44
                            The install will fail if the database does not exist in these cases.
 
45
                        </html:dd>
 
46
                        <html:dd>
 
47
                            The User attribute references credentials specified in a User element.
 
48
                            If a user is not specified then Windows Authentication will be used by default
 
49
                            using the credentials of the user performing the install to execute sql
 
50
                            strings, etc.
 
51
                        </html:dd>
 
52
                    </html:dl>
 
53
                </xse:remarks>
 
54
                <xse:seeAlso ref="User"/>
 
55
            </xs:appinfo>
 
56
            <xs:documentation>SQL Database</xs:documentation>
 
57
        </xs:annotation>
 
58
        <xs:complexType>
 
59
            <xs:choice minOccurs="0" maxOccurs="unbounded">
 
60
                <xs:sequence>
 
61
                  <xs:element ref="SqlFileSpec" minOccurs="0"/>
 
62
                  <xs:element ref="SqlLogFileSpec" minOccurs="0"/>
 
63
                </xs:sequence>
 
64
                <xs:element ref="SqlScript"/>
 
65
                <xs:element ref="SqlString"/>
 
66
            </xs:choice>
 
67
            <xs:attribute name="Id" use="required" type="xs:string"/>
 
68
            <xs:attribute name="Server" use="required" type="xs:string">
 
69
            </xs:attribute>
 
70
            <xs:attribute name="Instance" type="xs:string">
 
71
            </xs:attribute>
 
72
            <xs:attribute name="Database" use="required" type="xs:string">
 
73
                <xs:annotation>
 
74
                    <xs:documentation>
 
75
                        The name of the database. The value can be a literal value or derived from a
 
76
                        Property element using the <html:a href='http://msdn.microsoft.com/library/aa368609.aspx' target='_blank'>Formatted</html:a>
 
77
                        syntax.
 
78
                    </xs:documentation>
 
79
                </xs:annotation>
 
80
            </xs:attribute>
 
81
            <xs:attribute name="User" type="xs:string">
 
82
            </xs:attribute>
 
83
            <xs:attribute name="CreateOnInstall" type="YesNoType">
 
84
            </xs:attribute>
 
85
            <xs:attribute name="CreateOnReinstall" type="YesNoType">
 
86
                <xs:annotation>
 
87
                    <xs:documentation>
 
88
                        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.
 
89
                    </xs:documentation>
 
90
                </xs:annotation>
 
91
            </xs:attribute>
 
92
            <xs:attribute name="CreateOnUninstall" type="YesNoType">
 
93
            </xs:attribute>
 
94
            <xs:attribute name="DropOnInstall" type="YesNoType">
 
95
            </xs:attribute>
 
96
            <xs:attribute name="DropOnReinstall" type="YesNoType">
 
97
                <xs:annotation>
 
98
                    <xs:documentation>
 
99
                        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.
 
100
                    </xs:documentation>
 
101
                </xs:annotation>
 
102
            </xs:attribute>
 
103
            <xs:attribute name="DropOnUninstall" type="YesNoType">
 
104
            </xs:attribute>
 
105
            <xs:attribute name="ContinueOnError" type="YesNoType">
 
106
            </xs:attribute>
 
107
            <xs:attribute name="ConfirmOverwrite" type="YesNoType">
 
108
            </xs:attribute>
 
109
        </xs:complexType>
 
110
    </xs:element>
 
111
 
 
112
    <xs:element name="SqlFileSpec">
 
113
        <xs:annotation>
 
114
            <xs:documentation>File specification for a Sql database.</xs:documentation>
 
115
        </xs:annotation>
 
116
        <xs:complexType>
 
117
            <xs:attribute name="Id" use="required" type="xs:string">
 
118
                <xs:annotation>
 
119
                    <xs:documentation>ID of the file specification.</xs:documentation>
 
120
                </xs:annotation>
 
121
            </xs:attribute>
 
122
            <xs:attribute name="Name" type="xs:string">
 
123
                <xs:annotation>
 
124
                    <xs:documentation>Specifies the logical name for the database file.</xs:documentation>
 
125
                </xs:annotation>
 
126
            </xs:attribute>
 
127
            <xs:attribute name="Filename" use="required" type="xs:string">
 
128
                <xs:annotation>
 
129
                    <xs:documentation>Specifies the operating-system file name for the database file.</xs:documentation>
 
130
                </xs:annotation>
 
131
            </xs:attribute>
 
132
            <xs:attribute name="Size" type="xs:string">
 
133
                <xs:annotation>
 
134
                    <xs:documentation>
 
135
                        Specifies the size of the database file. The GB, MB and KB suffixes can be used to specify gigabytes, 
 
136
                        megabytes or kilobytes. The default is megabytes if no suffix is specified. When a Size is not 
 
137
                        supplied for a database file, SQL Server uses the size of the primary file in the model database. 
 
138
                    </xs:documentation>
 
139
                </xs:annotation>
 
140
            </xs:attribute>
 
141
            <xs:attribute name="MaxSize" type="xs:string">
 
142
                <xs:annotation>
 
143
                    <xs:documentation>
 
144
                        Specifies the maximum size to which the database file can grow. The GB, MB and KB suffixes can be used to 
 
145
                        to specify gigabytes, megabytes or kilobytes. The default is megabytes if no suffix is specified. If 
 
146
                        MaxSize is not specified, the file will grow until the disk is full.
 
147
                    </xs:documentation>
 
148
                </xs:annotation>
 
149
            </xs:attribute>
 
150
            <xs:attribute name="GrowthSize" type="xs:string">
 
151
                <xs:annotation>
 
152
                    <xs:documentation>
 
153
                        Specifies the growth increment of the database file. The GB, MB and KB and % suffixes can be used to 
 
154
                        specify gigabytes, megabytes, kilobytes or a percentage of the current file size to grow. The default is 
 
155
                        megabytes if no suffix is specified. The default value is 10% if GrowthSize is not specified, and the 
 
156
                        minimum value is 64 KB. The GrowthSize setting for a file cannot exceed the MaxSize setting.
 
157
                    </xs:documentation>
 
158
                </xs:annotation>
 
159
            </xs:attribute>
 
160
        </xs:complexType>
 
161
    </xs:element>
 
162
 
 
163
    <xs:element name="SqlLogFileSpec">
 
164
        <xs:annotation>
 
165
            <xs:documentation>File specification for a Sql database.</xs:documentation>
 
166
        </xs:annotation>
 
167
        <xs:complexType>
 
168
            <xs:attribute name="Id" type="xs:string">
 
169
                <xs:annotation>
 
170
                    <xs:documentation>ID of the log file specification.</xs:documentation>
 
171
                </xs:annotation>
 
172
            </xs:attribute>
 
173
            <xs:attribute name="Name" type="xs:string">
 
174
                <xs:annotation>
 
175
                    <xs:documentation>Specifies the logical name for the log file.</xs:documentation>
 
176
                </xs:annotation>
 
177
            </xs:attribute>
 
178
            <xs:attribute name="Filename" type="xs:string">
 
179
                <xs:annotation>
 
180
                    <xs:documentation>Specifies the operating-system file name for the log file.</xs:documentation>
 
181
                </xs:annotation>
 
182
            </xs:attribute>
 
183
            <xs:attribute name="Size" type="xs:string">
 
184
                <xs:annotation>
 
185
                    <xs:documentation>
 
186
                        Specifies the size of the log file. The GB, MB and KB suffixes can be used to specify gigabytes, 
 
187
                        megabytes or kilobytes. The default is megabytes if no suffix is specified. When a Size is not 
 
188
                        supplied for a log file, SQL Server makes the file 1 MB.
 
189
                    </xs:documentation>
 
190
                </xs:annotation>
 
191
            </xs:attribute>
 
192
            <xs:attribute name="MaxSize" type="xs:string">
 
193
                <xs:annotation>
 
194
                    <xs:documentation>
 
195
                        Specifies the maximum size to which the log file can grow. The GB, MB and KB suffixes can be used to 
 
196
                        to specify gigabytes, megabytes or kilobytes. The default is megabytes if no suffix is specified. If 
 
197
                        MaxSize is not specified, the file will grow until the disk is full.
 
198
                    </xs:documentation>
 
199
                </xs:annotation>
 
200
            </xs:attribute>
 
201
            <xs:attribute name="GrowthSize" type="xs:string">
 
202
                <xs:annotation>
 
203
                    <xs:documentation>
 
204
                        Specifies the growth increment of the log file. The GB, MB and KB and % suffixes can be used to 
 
205
                        specify gigabytes, megabytes, kilobytes or a percentage of the current file size to grow. The default is 
 
206
                        megabytes if no suffix is specified. The default value is 10% if GrowthSize is not specified, and the 
 
207
                        minimum value is 64 KB. The GrowthSize setting for a file cannot exceed the MaxSize setting.
 
208
                    </xs:documentation>
 
209
                </xs:annotation>
 
210
            </xs:attribute>
 
211
        </xs:complexType>
 
212
    </xs:element>
 
213
 
 
214
    <xs:element name="SqlScript">
 
215
        <xs:annotation>
 
216
            <xs:appinfo>
 
217
                <xse:parent namespace="http://schemas.microsoft.com/wix/2006/wi" ref="Component" />
 
218
            </xs:appinfo>
 
219
            <xs:documentation>SQL Script</xs:documentation>
 
220
        </xs:annotation>
 
221
        <xs:complexType>
 
222
            <xs:attribute name="Id" use="required" type="xs:string"/>
 
223
            <xs:attribute name="SqlDb" type="xs:string">
 
224
                <xs:annotation>
 
225
                    <xs:documentation>required when not child of SqlDatabase</xs:documentation>
 
226
                </xs:annotation>
 
227
            </xs:attribute>
 
228
            <xs:attribute name="User" type="xs:string">
 
229
            </xs:attribute>
 
230
            <xs:attribute name="BinaryKey" type="xs:string" use="required">
 
231
                <xs:annotation>
 
232
                    <xs:documentation>Reference to Binary stream that contains the SQL script to execute.</xs:documentation>
 
233
                </xs:annotation>
 
234
            </xs:attribute>
 
235
            <xs:attribute name="ExecuteOnInstall" type="YesNoType">
 
236
                <xs:annotation>
 
237
                    <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>
 
238
                </xs:annotation>
 
239
            </xs:attribute>
 
240
            <xs:attribute name="ExecuteOnReinstall" type="YesNoType">
 
241
                <xs:annotation>
 
242
                    <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>
 
243
                </xs:annotation>
 
244
            </xs:attribute>
 
245
            <xs:attribute name="ExecuteOnUninstall" type="YesNoType">
 
246
                <xs:annotation>
 
247
                    <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>
 
248
                </xs:annotation>
 
249
            </xs:attribute>
 
250
            <xs:attribute name="RollbackOnInstall" type="YesNoType">
 
251
                <xs:annotation>
 
252
                    <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>
 
253
                </xs:annotation>
 
254
            </xs:attribute>
 
255
            <xs:attribute name="RollbackOnReinstall" type="YesNoType">
 
256
                <xs:annotation>
 
257
                    <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>
 
258
                </xs:annotation>
 
259
            </xs:attribute>
 
260
            <xs:attribute name="RollbackOnUninstall" type="YesNoType">
 
261
                <xs:annotation>
 
262
                    <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>
 
263
                </xs:annotation>
 
264
            </xs:attribute>
 
265
            <xs:attribute name="ContinueOnError" type="YesNoType">
 
266
                <xs:annotation>
 
267
                    <xs:documentation>Continue executing scripts even if this one fails.</xs:documentation>
 
268
                </xs:annotation>
 
269
            </xs:attribute>
 
270
            <xs:attribute name="Sequence" type="xs:integer">
 
271
                <xs:annotation>
 
272
                    <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>
 
273
                </xs:annotation>
 
274
            </xs:attribute>
 
275
        </xs:complexType>
 
276
    </xs:element>
 
277
 
 
278
    <xs:element name="SqlString">
 
279
        <xs:annotation>
 
280
            <xs:appinfo>
 
281
                <xse:parent namespace="http://schemas.microsoft.com/wix/2006/wi" ref="Component" />
 
282
            </xs:appinfo>
 
283
            <xs:documentation>SQL String</xs:documentation>
 
284
        </xs:annotation>
 
285
        <xs:complexType>
 
286
            <xs:attribute name="Id" use="required" type="xs:string">
 
287
            </xs:attribute>
 
288
            <xs:attribute name="SQL" use="required" type="xs:string">
 
289
            </xs:attribute>
 
290
            <xs:attribute name="User" type="xs:string">
 
291
            </xs:attribute>
 
292
            <xs:attribute name="SqlDb" type="xs:string">
 
293
            </xs:attribute>
 
294
            <xs:attribute name="ExecuteOnInstall" type="YesNoType">
 
295
                <xs:annotation>
 
296
                    <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>
 
297
                </xs:annotation>
 
298
            </xs:attribute>
 
299
            <xs:attribute name="ExecuteOnReinstall" type="YesNoType">
 
300
                <xs:annotation>
 
301
                    <xs:documentation>
 
302
                        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.
 
303
                    </xs:documentation>
 
304
                </xs:annotation>
 
305
            </xs:attribute>
 
306
            <xs:attribute name="ExecuteOnUninstall" type="YesNoType">
 
307
                <xs:annotation>
 
308
                    <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>
 
309
                </xs:annotation>
 
310
            </xs:attribute>
 
311
            <xs:attribute name="RollbackOnInstall" type="YesNoType">
 
312
                <xs:annotation>
 
313
                    <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>
 
314
                </xs:annotation>
 
315
            </xs:attribute>
 
316
            <xs:attribute name="RollbackOnReinstall" type="YesNoType">
 
317
                <xs:annotation>
 
318
                    <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>
 
319
                </xs:annotation>
 
320
            </xs:attribute>
 
321
            <xs:attribute name="RollbackOnUninstall" type="YesNoType">
 
322
                <xs:annotation>
 
323
                    <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>
 
324
                </xs:annotation>
 
325
            </xs:attribute>
 
326
            <xs:attribute name="ContinueOnError" type="YesNoType">
 
327
                <xs:annotation>
 
328
                    <xs:documentation>Continue executing strings even if this one fails.</xs:documentation>
 
329
                </xs:annotation>
 
330
            </xs:attribute>
 
331
            <xs:attribute name="Sequence" type="xs:integer">
 
332
                <xs:annotation>
 
333
                    <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>
 
334
                </xs:annotation>
 
335
            </xs:attribute>
 
336
        </xs:complexType>
 
337
    </xs:element>
 
338
 
 
339
    <xs:simpleType name="YesNoType">
 
340
        <xs:annotation>
 
341
            <xs:documentation>Values of this type will either be "yes" or "no".</xs:documentation>
 
342
        </xs:annotation>
 
343
        <xs:restriction base='xs:NMTOKEN'>
 
344
            <xs:enumeration value="no"/>
 
345
            <xs:enumeration value="yes"/>
 
346
        </xs:restriction>
 
347
    </xs:simpleType>
 
348
 
 
349
</xs:schema>