aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBob Arnson <bob@firegiant.com>2021-04-18 21:09:37 -0400
committerBob Arnson <bob@firegiant.com>2021-04-18 21:12:50 -0400
commit594bb035b8f27d341c982dc0754589a447b9abd6 (patch)
treebb13b0a6d5e03fc5ff406a18682a1e9c0c170aa1
parentbabe3697ec562d6f93f209e23dc03ba77fa57805 (diff)
downloadwix-594bb035b8f27d341c982dc0754589a447b9abd6.tar.gz
wix-594bb035b8f27d341c982dc0754589a447b9abd6.tar.bz2
wix-594bb035b8f27d341c982dc0754589a447b9abd6.zip
Add `Wix4` table prefixes.
Per https://github.com/wixtoolset/issues/issues/5933.
-rw-r--r--src/ca/scadb.cpp39
-rw-r--r--src/ca/scaexec.cpp2
-rw-r--r--src/ca/scasql.cpp10
-rw-r--r--src/ca/scasqlstr.cpp56
-rw-r--r--src/ca/scasqlstr.h2
-rw-r--r--src/test/WixToolsetTest.Sql/SqlExtensionFixture.cs12
-rw-r--r--src/test/WixToolsetTest.Sql/TestData/UsingSql/PackageComponents.wxs12
-rw-r--r--src/wixext/SqlTableDefinitions.cs18
8 files changed, 82 insertions, 69 deletions
diff --git a/src/ca/scadb.cpp b/src/ca/scadb.cpp
index 68f7b10b..288b9efe 100644
--- a/src/ca/scadb.cpp
+++ b/src/ca/scadb.cpp
@@ -5,12 +5,12 @@
5// sql queries 5// sql queries
6LPCWSTR vcsSqlDatabaseQuery = L"SELECT `SqlDb`, `Server`, `Instance`, `Database`, " 6LPCWSTR vcsSqlDatabaseQuery = L"SELECT `SqlDb`, `Server`, `Instance`, `Database`, "
7 L"`Component_`, `User_`, `FileSpec_`, `FileSpec_Log`, `Attributes` " 7 L"`Component_`, `User_`, `FileSpec_`, `FileSpec_Log`, `Attributes` "
8 L"FROM `SqlDatabase`"; 8 L"FROM `Wix4SqlDatabase`";
9enum eSqlDatabaseQuery { sdqSqlDb = 1, sdqServer, sdqInstance, sdqDatabase, 9enum eSqlDatabaseQuery { sdqSqlDb = 1, sdqServer, sdqInstance, sdqDatabase,
10 sdqComponent, sdqUser, sdqDbFileSpec, sdqLogFileSpec, sdqAttributes }; 10 sdqComponent, sdqUser, sdqDbFileSpec, sdqLogFileSpec, sdqAttributes };
11 11
12LPCWSTR vcsSqlFileSpecQuery = L"SELECT `FileSpec`, `Name`, `Filename`, `Size`, " 12LPCWSTR vcsSqlFileSpecQuery = L"SELECT `FileSpec`, `Name`, `Filename`, `Size`, "
13 L"`MaxSize`, `GrowthSize` FROM `SqlFileSpec` WHERE `FileSpec`=?"; 13 L"`MaxSize`, `GrowthSize` FROM `Wix4SqlFileSpec` WHERE `FileSpec`=?";
14enum eSqlFileSpecQuery { sfsqFileSpec = 1, sfsqName, sfsqFilename, sfsqSize, 14enum eSqlFileSpecQuery { sfsqFileSpec = 1, sfsqName, sfsqFilename, sfsqSize,
15 sfsqMaxSize, sfsqGrowth }; 15 sfsqMaxSize, sfsqGrowth };
16 16
@@ -63,21 +63,21 @@ HRESULT ScaDbsRead(
63 63
64 SCA_DB* psd = NULL; 64 SCA_DB* psd = NULL;
65 65
66 if (S_OK != WcaTableExists(L"SqlDatabase")) 66 if (S_OK != WcaTableExists(L"Wix4SqlDatabase"))
67 { 67 {
68 WcaLog(LOGMSG_VERBOSE, "Skipping ScaCreateDatabase() - SqlDatabase table not present"); 68 WcaLog(LOGMSG_VERBOSE, "Skipping ScaCreateDatabase() - Wix4SqlDatabase table not present");
69 ExitFunction1(hr = S_FALSE); 69 ExitFunction1(hr = S_FALSE);
70 } 70 }
71 71
72 if (S_OK == WcaTableExists(L"SqlFileSpec")) 72 if (S_OK == WcaTableExists(L"Wix4SqlFileSpec"))
73 { 73 {
74 hr = WcaOpenView(vcsSqlFileSpecQuery, &hViewFileSpec); 74 hr = WcaOpenView(vcsSqlFileSpecQuery, &hViewFileSpec);
75 ExitOnFailure(hr, "failed to open view on SqlFileSpec table"); 75 ExitOnFailure(hr, "failed to open view on Wix4SqlFileSpec table");
76 } 76 }
77 77
78 // loop through all the sql databases 78 // loop through all the sql databases
79 hr = WcaOpenExecuteView(vcsSqlDatabaseQuery, &hView); 79 hr = WcaOpenExecuteView(vcsSqlDatabaseQuery, &hView);
80 ExitOnFailure(hr, "Failed to open view on SqlDatabase table"); 80 ExitOnFailure(hr, "Failed to open view on Wix4SqlDatabase table");
81 while (S_OK == (hr = WcaFetchRecord(hView, &hRec))) 81 while (S_OK == (hr = WcaFetchRecord(hView, &hRec)))
82 { 82 {
83 BOOL fHasComponent = FALSE; 83 BOOL fHasComponent = FALSE;
@@ -85,7 +85,7 @@ HRESULT ScaDbsRead(
85 INSTALLSTATE isAction = INSTALLSTATE_UNKNOWN; 85 INSTALLSTATE isAction = INSTALLSTATE_UNKNOWN;
86 86
87 hr = WcaGetRecordString(hRec, sdqSqlDb, &pwzId); 87 hr = WcaGetRecordString(hRec, sdqSqlDb, &pwzId);
88 ExitOnFailure(hr, "Failed to get SqlDatabase.SqlDb"); 88 ExitOnFailure(hr, "Failed to get Wix4SqlDatabase.SqlDb");
89 89
90 hr = WcaGetRecordString(hRec, sdqComponent, &pwzComponent); 90 hr = WcaGetRecordString(hRec, sdqComponent, &pwzComponent);
91 ExitOnFailure(hr, "Failed to get Component for database: '%ls'", psd->wzKey); 91 ExitOnFailure(hr, "Failed to get Component for database: '%ls'", psd->wzKey);
@@ -110,10 +110,10 @@ HRESULT ScaDbsRead(
110 ExitOnFailure(hr, "Failed to allocate memory for new database: %D", pwzId); 110 ExitOnFailure(hr, "Failed to allocate memory for new database: %D", pwzId);
111 111
112 hr = ::StringCchCopyW(psd->wzKey, countof(psd->wzKey), pwzId); 112 hr = ::StringCchCopyW(psd->wzKey, countof(psd->wzKey), pwzId);
113 ExitOnFailure(hr, "Failed to copy SqlDatabase.SqlDbL: %ls", pwzId); 113 ExitOnFailure(hr, "Failed to copy Wix4SqlDatabase.SqlDbL: %ls", pwzId);
114 114
115 hr = ::StringCchCopyW(psd->wzComponent, countof(psd->wzComponent), pwzComponent); 115 hr = ::StringCchCopyW(psd->wzComponent, countof(psd->wzComponent), pwzComponent);
116 ExitOnFailure(hr, "Failed to copy SqlDatabase.Component_: %ls", pwzComponent); 116 ExitOnFailure(hr, "Failed to copy Wix4SqlDatabase.Component_: %ls", pwzComponent);
117 117
118 psd->fHasComponent = fHasComponent; 118 psd->fHasComponent = fHasComponent;
119 psd->isInstalled = isInstalled; 119 psd->isInstalled = isInstalled;
@@ -135,7 +135,7 @@ HRESULT ScaDbsRead(
135 ExitOnFailure(hr, "Failed to copy database string to database object:%ls", pwzData); 135 ExitOnFailure(hr, "Failed to copy database string to database object:%ls", pwzData);
136 136
137 hr = WcaGetRecordInteger(hRec, sdqAttributes, &psd->iAttributes); 137 hr = WcaGetRecordInteger(hRec, sdqAttributes, &psd->iAttributes);
138 ExitOnFailure(hr, "Failed to get SqlDatabase.Attributes"); 138 ExitOnFailure(hr, "Failed to get Wix4SqlDatabase.Attributes");
139 139
140 hr = WcaGetRecordFormattedString(hRec, sdqUser, &pwzData); 140 hr = WcaGetRecordFormattedString(hRec, sdqUser, &pwzData);
141 ExitOnFailure(hr, "Failed to get User record for database: '%ls'", psd->wzKey); 141 ExitOnFailure(hr, "Failed to get User record for database: '%ls'", psd->wzKey);
@@ -189,7 +189,7 @@ HRESULT ScaDbsRead(
189 { 189 {
190 hr = S_OK; 190 hr = S_OK;
191 } 191 }
192 ExitOnFailure(hr, "Failure occured while processing SqlDatabase table"); 192 ExitOnFailure(hr, "Failure occured while processing Wix4SqlDatabase table");
193 193
194LExit: 194LExit:
195 if (psd) 195 if (psd)
@@ -521,18 +521,18 @@ HRESULT GetFileSpec(
521 521
522 // get the FileSpec record 522 // get the FileSpec record
523 hr = WcaExecuteView(hViewFileSpec, hRecFileSpec); 523 hr = WcaExecuteView(hViewFileSpec, hRecFileSpec);
524 ExitOnFailure(hr, "failed to execute view on SqlFileSpec table for filespec: %ls", wzKey); 524 ExitOnFailure(hr, "failed to execute view on Wix4SqlFileSpec table for filespec: %ls", wzKey);
525 hr = WcaFetchSingleRecord(hViewFileSpec, &hRec); 525 hr = WcaFetchSingleRecord(hViewFileSpec, &hRec);
526 ExitOnFailure(hr, "failed to get record for filespec: %ls", wzKey); 526 ExitOnFailure(hr, "failed to get record for filespec: %ls", wzKey);
527 527
528 // read the data out of the filespec record 528 // read the data out of the filespec record
529 hr = WcaGetRecordFormattedString(hRec, sfsqName, &pwzData); 529 hr = WcaGetRecordFormattedString(hRec, sfsqName, &pwzData);
530 ExitOnFailure(hr, "Failed to get SqlFileSpec.Name for filespec: %ls", wzKey); 530 ExitOnFailure(hr, "Failed to get Wix4SqlFileSpec.Name for filespec: %ls", wzKey);
531 hr = ::StringCchCopyW(psf->wzName, countof(psf->wzName), pwzData); 531 hr = ::StringCchCopyW(psf->wzName, countof(psf->wzName), pwzData);
532 ExitOnFailure(hr, "Failed to copy SqlFileSpec.Name string: %ls", pwzData); 532 ExitOnFailure(hr, "Failed to copy Wix4SqlFileSpec.Name string: %ls", pwzData);
533 533
534 hr = WcaGetRecordFormattedString(hRec, sfsqFilename, &pwzData); 534 hr = WcaGetRecordFormattedString(hRec, sfsqFilename, &pwzData);
535 ExitOnFailure(hr, "Failed to get SqlFileSpec.Filename for filespec: %ls", wzKey); 535 ExitOnFailure(hr, "Failed to get Wix4SqlFileSpec.Filename for filespec: %ls", wzKey);
536 if (*pwzData) 536 if (*pwzData)
537 { 537 {
538 hr = ::StringCchCopyW(psf->wzFilename, countof(psf->wzFilename), pwzData); 538 hr = ::StringCchCopyW(psf->wzFilename, countof(psf->wzFilename), pwzData);
@@ -545,7 +545,7 @@ HRESULT GetFileSpec(
545 } 545 }
546 546
547 hr = WcaGetRecordFormattedString(hRec, sfsqSize, &pwzData); 547 hr = WcaGetRecordFormattedString(hRec, sfsqSize, &pwzData);
548 ExitOnFailure(hr, "Failed to get SqlFileSpec.Size for filespec: %ls", wzKey); 548 ExitOnFailure(hr, "Failed to get Wix4SqlFileSpec.Size for filespec: %ls", wzKey);
549 if (*pwzData) 549 if (*pwzData)
550 { 550 {
551 hr = ::StringCchCopyW(psf->wzSize, countof(psf->wzSize), pwzData); 551 hr = ::StringCchCopyW(psf->wzSize, countof(psf->wzSize), pwzData);
@@ -557,7 +557,7 @@ HRESULT GetFileSpec(
557 } 557 }
558 558
559 hr = WcaGetRecordFormattedString(hRec, sfsqMaxSize, &pwzData); 559 hr = WcaGetRecordFormattedString(hRec, sfsqMaxSize, &pwzData);
560 ExitOnFailure(hr, "Failed to get SqlFileSpec.MaxSize for filespec: %ls", wzKey); 560 ExitOnFailure(hr, "Failed to get Wix4SqlFileSpec.MaxSize for filespec: %ls", wzKey);
561 if (*pwzData) 561 if (*pwzData)
562 { 562 {
563 hr = ::StringCchCopyW(psf->wzMaxSize, countof(psf->wzMaxSize), pwzData); 563 hr = ::StringCchCopyW(psf->wzMaxSize, countof(psf->wzMaxSize), pwzData);
@@ -569,7 +569,7 @@ HRESULT GetFileSpec(
569 } 569 }
570 570
571 hr = WcaGetRecordFormattedString(hRec, sfsqGrowth, &pwzData); 571 hr = WcaGetRecordFormattedString(hRec, sfsqGrowth, &pwzData);
572 ExitOnFailure(hr, "Failed to get SqlFileSpec.GrowthSize for filespec: %ls", wzKey); 572 ExitOnFailure(hr, "Failed to get Wix4SqlFileSpec.GrowthSize for filespec: %ls", wzKey);
573 if (*pwzData) 573 if (*pwzData)
574 { 574 {
575 hr = ::StringCchCopyW(psf->wzGrow, countof(psf->wzGrow), pwzData); 575 hr = ::StringCchCopyW(psf->wzGrow, countof(psf->wzGrow), pwzData);
@@ -581,6 +581,7 @@ HRESULT GetFileSpec(
581 } 581 }
582 582
583 hr = S_OK; 583 hr = S_OK;
584
584LExit: 585LExit:
585 ReleaseStr(pwzData); 586 ReleaseStr(pwzData);
586 return hr; 587 return hr;
diff --git a/src/ca/scaexec.cpp b/src/ca/scaexec.cpp
index 7a30f52a..b2648361 100644
--- a/src/ca/scaexec.cpp
+++ b/src/ca/scaexec.cpp
@@ -342,7 +342,7 @@ extern "C" UINT __stdcall ExecuteSqlStrings(MSIHANDLE hInstall)
342 hr = WcaReadStringFromCaData(&pwz, &pwzSql); 342 hr = WcaReadStringFromCaData(&pwz, &pwzSql);
343 ExitOnFailure(hr, "failed to read SQL string for key: %ls", pwzSqlKey); 343 ExitOnFailure(hr, "failed to read SQL string for key: %ls", pwzSqlKey);
344 344
345 // If the SqlString row is set to continue on error and the DB connection failed, skip attempting to execute 345 // If the Wix4SqlString row is set to continue on error and the DB connection failed, skip attempting to execute
346 if ((iAttributesSQL & SCASQL_CONTINUE_ON_ERROR) && FAILED(hrDB)) 346 if ((iAttributesSQL & SCASQL_CONTINUE_ON_ERROR) && FAILED(hrDB))
347 { 347 {
348 WcaLog(LOGMSG_STANDARD, "Error 0x%x: continuing after failure to connect to database: %ls", hrDB, pwzDatabase); 348 WcaLog(LOGMSG_STANDARD, "Error 0x%x: continuing after failure to connect to database: %ls", hrDB, pwzDatabase);
diff --git a/src/ca/scasql.cpp b/src/ca/scasql.cpp
index 5e3edd1c..b0216950 100644
--- a/src/ca/scasql.cpp
+++ b/src/ca/scasql.cpp
@@ -67,21 +67,21 @@ static HRESULT ConfigureSqlData(
67 SCA_SQLSTR* psssList = NULL; 67 SCA_SQLSTR* psssList = NULL;
68 68
69 // check for the prerequsite tables 69 // check for the prerequsite tables
70 if (S_OK != WcaTableExists(L"SqlDatabase")) 70 if (S_OK != WcaTableExists(L"Wix4SqlDatabase"))
71 { 71 {
72 WcaLog(LOGMSG_VERBOSE, "skipping SQL CustomAction, no SqlDatabase table"); 72 WcaLog(LOGMSG_VERBOSE, "skipping SQL CustomAction, no Wix4SqlDatabase table");
73 ExitFunction1(hr = S_FALSE); 73 ExitFunction1(hr = S_FALSE);
74 } 74 }
75 75
76 // read tables 76 // read tables
77 hr = ScaDbsRead(&psdList, saAction); 77 hr = ScaDbsRead(&psdList, saAction);
78 ExitOnFailure(hr, "failed to read SqlDatabase table"); 78 ExitOnFailure(hr, "failed to read Wix4SqlDatabase table");
79 79
80 hr = ScaSqlStrsRead(&psssList, saAction); 80 hr = ScaSqlStrsRead(&psssList, saAction);
81 ExitOnFailure(hr, "failed to read SqlStrings table"); 81 ExitOnFailure(hr, "failed to read Wix4SqlString table");
82 82
83 hr = ScaSqlStrsReadScripts(&psssList, saAction); 83 hr = ScaSqlStrsReadScripts(&psssList, saAction);
84 ExitOnFailure(hr, "failed to read SqlScripts table"); 84 ExitOnFailure(hr, "failed to read Wix4SqlScript table");
85 85
86 if (SCA_ACTION_UNINSTALL == saAction) 86 if (SCA_ACTION_UNINSTALL == saAction)
87 { 87 {
diff --git a/src/ca/scasqlstr.cpp b/src/ca/scasqlstr.cpp
index 6ac526a6..c3ebd43d 100644
--- a/src/ca/scasqlstr.cpp
+++ b/src/ca/scasqlstr.cpp
@@ -4,11 +4,11 @@
4 4
5// sql queries 5// sql queries
6LPCWSTR vcsSqlStringQuery = L"SELECT `String`, `SqlDb_`, `Component_`,`SQL`,`User_`,`Attributes`,`Sequence` " 6LPCWSTR vcsSqlStringQuery = L"SELECT `String`, `SqlDb_`, `Component_`,`SQL`,`User_`,`Attributes`,`Sequence` "
7L"FROM `SqlString` ORDER BY `SqlDb_`,`Sequence`"; 7L"FROM `Wix4SqlString` ORDER BY `SqlDb_`,`Sequence`";
8enum eSqlStringQuery { ssqSqlString = 1, ssqSqlDb, ssqComponent, ssqSQL, ssqUser, ssqAttributes, ssqSequence }; 8enum eSqlStringQuery { ssqSqlString = 1, ssqSqlDb, ssqComponent, ssqSQL, ssqUser, ssqAttributes, ssqSequence };
9 9
10LPCWSTR vcsSqlScriptQuery = L"SELECT `ScriptBinary_`,`Script`, `SqlDb_`, `Component_`,`User_`,`Attributes`,`Sequence` " 10LPCWSTR vcsSqlScriptQuery = L"SELECT `ScriptBinary_`,`Script`, `SqlDb_`, `Component_`,`User_`,`Attributes`,`Sequence` "
11L"FROM `SqlScript` ORDER BY `SqlDb_`,`Sequence`"; 11L"FROM `Wix4SqlScript` ORDER BY `SqlDb_`,`Sequence`";
12enum eSqlScriptQuery { sscrqScriptBinary=1, sscrqSqlScript, sscrqSqlDb, sscrqComponent, sscrqUser, sscrqAttributes, sscrqSequence }; 12enum eSqlScriptQuery { sscrqScriptBinary=1, sscrqSqlScript, sscrqSqlDb, sscrqComponent, sscrqUser, sscrqAttributes, sscrqSequence };
13 13
14LPCWSTR vcsSqlBinaryScriptQuery = L"SELECT `Data` FROM `Binary` WHERE `Name`=?"; 14LPCWSTR vcsSqlBinaryScriptQuery = L"SELECT `Data` FROM `Binary` WHERE `Name`=?";
@@ -44,15 +44,15 @@ HRESULT ScaSqlStrsRead(
44 44
45 SCA_SQLSTR* psss = NULL; 45 SCA_SQLSTR* psss = NULL;
46 46
47 if (S_OK != WcaTableExists(L"SqlString") || S_OK != WcaTableExists(L"SqlDatabase")) 47 if (S_OK != WcaTableExists(L"Wix4SqlString") || S_OK != WcaTableExists(L"Wix4SqlDatabase"))
48 { 48 {
49 WcaLog(LOGMSG_VERBOSE, "Skipping ScaSqlStrsRead() - SqlString and/or SqlDatabase table not present"); 49 WcaLog(LOGMSG_VERBOSE, "Skipping ScaSqlStrsRead() - Wix4SqlString and/or Wix4SqlDatabase table not present");
50 ExitFunction1(hr = S_FALSE); 50 ExitFunction1(hr = S_FALSE);
51 } 51 }
52 52
53 // loop through all the sql strings 53 // loop through all the sql strings
54 hr = WcaOpenExecuteView(vcsSqlStringQuery, &hView); 54 hr = WcaOpenExecuteView(vcsSqlStringQuery, &hView);
55 ExitOnFailure(hr, "Failed to open view on SqlString table"); 55 ExitOnFailure(hr, "Failed to open view on Wix4SqlString table");
56 while (S_OK == (hr = WcaFetchRecord(hView, &hRec))) 56 while (S_OK == (hr = WcaFetchRecord(hView, &hRec)))
57 { 57 {
58 INSTALLSTATE isInstalled = INSTALLSTATE_UNKNOWN; 58 INSTALLSTATE isInstalled = INSTALLSTATE_UNKNOWN;
@@ -80,30 +80,30 @@ HRESULT ScaSqlStrsRead(
80 psss->isAction = isAction; 80 psss->isAction = isAction;
81 81
82 hr = WcaGetRecordString(hRec, ssqSqlString, &pwzData); 82 hr = WcaGetRecordString(hRec, ssqSqlString, &pwzData);
83 ExitOnFailure(hr, "Failed to get SqlString.String"); 83 ExitOnFailure(hr, "Failed to get Wix4SqlString.String");
84 hr = ::StringCchCopyW(psss->wzKey, countof(psss->wzKey), pwzData); 84 hr = ::StringCchCopyW(psss->wzKey, countof(psss->wzKey), pwzData);
85 ExitOnFailure(hr, "Failed to copy SqlString.String: %ls", pwzData); 85 ExitOnFailure(hr, "Failed to copy Wix4SqlString.String: %ls", pwzData);
86 86
87 // find the database information for this string 87 // find the database information for this string
88 hr = WcaGetRecordString(hRec, ssqSqlDb, &pwzData); 88 hr = WcaGetRecordString(hRec, ssqSqlDb, &pwzData);
89 ExitOnFailure(hr, "Failed to get SqlString.SqlDb_ for SqlString '%ls'", psss->wzKey); 89 ExitOnFailure(hr, "Failed to get Wix4SqlString.SqlDb_ for SqlString '%ls'", psss->wzKey);
90 hr = ::StringCchCopyW(psss->wzSqlDb, countof(psss->wzSqlDb), pwzData); 90 hr = ::StringCchCopyW(psss->wzSqlDb, countof(psss->wzSqlDb), pwzData);
91 ExitOnFailure(hr, "Failed to copy SqlString.SqlDb_: %ls", pwzData); 91 ExitOnFailure(hr, "Failed to copy Wix4SqlString.SqlDb_: %ls", pwzData);
92 92
93 hr = WcaGetRecordInteger(hRec, ssqAttributes, &psss->iAttributes); 93 hr = WcaGetRecordInteger(hRec, ssqAttributes, &psss->iAttributes);
94 ExitOnFailure(hr, "Failed to get SqlString.Attributes for SqlString '%ls'", psss->wzKey); 94 ExitOnFailure(hr, "Failed to get Wix4SqlString.Attributes for SqlString '%ls'", psss->wzKey);
95 95
96 //get the sequence number for the string (note that this will be sequenced with scripts too) 96 //get the sequence number for the string (note that this will be sequenced with scripts too)
97 hr = WcaGetRecordInteger(hRec, ssqSequence, &psss->iSequence); 97 hr = WcaGetRecordInteger(hRec, ssqSequence, &psss->iSequence);
98 ExitOnFailure(hr, "Failed to get SqlString.Sequence for SqlString '%ls'", psss->wzKey); 98 ExitOnFailure(hr, "Failed to get Wix4SqlString.Sequence for SqlString '%ls'", psss->wzKey);
99 99
100 // execute SQL 100 // execute SQL
101 hr = WcaGetRecordFormattedString(hRec, ssqSQL, &pwzData); 101 hr = WcaGetRecordFormattedString(hRec, ssqSQL, &pwzData);
102 ExitOnFailure(hr, "Failed to get SqlString.SQL for SqlString '%ls'", psss->wzKey); 102 ExitOnFailure(hr, "Failed to get Wix4SqlString.SQL for SQL string '%ls'", psss->wzKey);
103 103
104 Assert(!psss->pwzSql); 104 Assert(!psss->pwzSql);
105 hr = StrAllocString(&psss->pwzSql, pwzData, 0); 105 hr = StrAllocString(&psss->pwzSql, pwzData, 0);
106 ExitOnFailure(hr, "Failed to alloc string for SqlString '%ls'", psss->wzKey); 106 ExitOnFailure(hr, "Failed to alloc string for SQL string '%ls'", psss->wzKey);
107 107
108 *ppsssList = AddSqlStrToList(*ppsssList, psss); 108 *ppsssList = AddSqlStrToList(*ppsssList, psss);
109 psss = NULL; // set the sss to NULL so it doesn't get freed below 109 psss = NULL; // set the sss to NULL so it doesn't get freed below
@@ -113,7 +113,7 @@ HRESULT ScaSqlStrsRead(
113 { 113 {
114 hr = S_OK; 114 hr = S_OK;
115 } 115 }
116 ExitOnFailure(hr, "Failure occured while reading SqlString table"); 116 ExitOnFailure(hr, "Failure occured while reading Wix4SqlString table");
117 117
118LExit: 118LExit:
119 // if anything was left over after an error clean it all up 119 // if anything was left over after an error clean it all up
@@ -157,19 +157,19 @@ HRESULT ScaSqlStrsReadScripts(
157 SCA_SQLSTR sss; 157 SCA_SQLSTR sss;
158 SCA_SQLSTR* psss = NULL; 158 SCA_SQLSTR* psss = NULL;
159 159
160 if (S_OK != WcaTableExists(L"SqlScript") || S_OK != WcaTableExists(L"SqlDatabase") || S_OK != WcaTableExists(L"Binary")) 160 if (S_OK != WcaTableExists(L"Wix4SqlScript") || S_OK != WcaTableExists(L"Wix4SqlDatabase") || S_OK != WcaTableExists(L"Binary"))
161 { 161 {
162 WcaLog(LOGMSG_VERBOSE, "Skipping ScaSqlStrsReadScripts() - SqlScripts and/or SqlDatabase table not present"); 162 WcaLog(LOGMSG_VERBOSE, "Skipping ScaSqlStrsReadScripts() - Wix4SqlScript and/or Wix4SqlDatabase table not present");
163 ExitFunction1(hr = S_FALSE); 163 ExitFunction1(hr = S_FALSE);
164 } 164 }
165 165
166 // open a view on the binary table 166 // open a view on the binary table
167 hr = WcaOpenView(vcsSqlBinaryScriptQuery, &hViewBinary); 167 hr = WcaOpenView(vcsSqlBinaryScriptQuery, &hViewBinary);
168 ExitOnFailure(hr, "Failed to open view on Binary table for SqlScripts"); 168 ExitOnFailure(hr, "Failed to open view on Binary table for SQL scripts");
169 169
170 // loop through all the sql scripts 170 // loop through all the sql scripts
171 hr = WcaOpenExecuteView(vcsSqlScriptQuery, &hView); 171 hr = WcaOpenExecuteView(vcsSqlScriptQuery, &hView);
172 ExitOnFailure(hr, "Failed to open view on SqlScript table"); 172 ExitOnFailure(hr, "Failed to open view on Wix4SqlScript table");
173 while (S_OK == (hr = WcaFetchRecord(hView, &hRec))) 173 while (S_OK == (hr = WcaFetchRecord(hView, &hRec)))
174 { 174 {
175 INSTALLSTATE isInstalled = INSTALLSTATE_UNKNOWN; 175 INSTALLSTATE isInstalled = INSTALLSTATE_UNKNOWN;
@@ -196,33 +196,33 @@ HRESULT ScaSqlStrsReadScripts(
196 sss.isAction = isAction; 196 sss.isAction = isAction;
197 197
198 hr = WcaGetRecordString(hRec, sscrqSqlScript, &pwzData); 198 hr = WcaGetRecordString(hRec, sscrqSqlScript, &pwzData);
199 ExitOnFailure(hr, "Failed to get SqlScript.Script"); 199 ExitOnFailure(hr, "Failed to get Wix4SqlScript.Script");
200 hr = ::StringCchCopyW(sss.wzKey, countof(sss.wzKey), pwzData); 200 hr = ::StringCchCopyW(sss.wzKey, countof(sss.wzKey), pwzData);
201 ExitOnFailure(hr, "Failed to copy SqlScript.Script: %ls", pwzData); 201 ExitOnFailure(hr, "Failed to copy Wix4SqlScript.Script: %ls", pwzData);
202 202
203 // find the database information for this string 203 // find the database information for this string
204 hr = WcaGetRecordString(hRec, sscrqSqlDb, &pwzData); 204 hr = WcaGetRecordString(hRec, sscrqSqlDb, &pwzData);
205 ExitOnFailure(hr, "Failed to get SqlScript.SqlDb_ for SqlScript '%ls'", sss.wzKey); 205 ExitOnFailure(hr, "Failed to get Wix4SqlScript.SqlDb_ for SqlScript '%ls'", sss.wzKey);
206 hr = ::StringCchCopyW(sss.wzSqlDb, countof(sss.wzSqlDb), pwzData); 206 hr = ::StringCchCopyW(sss.wzSqlDb, countof(sss.wzSqlDb), pwzData);
207 ExitOnFailure(hr, "Failed to copy SqlScritp.SqlDbb: %ls", pwzData); 207 ExitOnFailure(hr, "Failed to copy Wix4SqlScript.SqlDbb: %ls", pwzData);
208 208
209 hr = WcaGetRecordInteger(hRec, sscrqAttributes, &sss.iAttributes); 209 hr = WcaGetRecordInteger(hRec, sscrqAttributes, &sss.iAttributes);
210 ExitOnFailure(hr, "Failed to get SqlScript.Attributes for SqlScript '%ls'", sss.wzKey); 210 ExitOnFailure(hr, "Failed to get Wix4SqlScript.Attributes for SqlScript '%ls'", sss.wzKey);
211 211
212 hr = WcaGetRecordInteger(hRec, sscrqSequence, &sss.iSequence); 212 hr = WcaGetRecordInteger(hRec, sscrqSequence, &sss.iSequence);
213 ExitOnFailure(hr, "Failed to get SqlScript.Sequence for SqlScript '%ls'", sss.wzKey); 213 ExitOnFailure(hr, "Failed to get Wix4SqlScript.Sequence for SqlScript '%ls'", sss.wzKey);
214 214
215 // get the sql script out of the binary stream 215 // get the sql script out of the binary stream
216 hr = WcaExecuteView(hViewBinary, hRec); 216 hr = WcaExecuteView(hViewBinary, hRec);
217 ExitOnFailure(hr, "Failed to open SqlScript.BinaryScript_ for SqlScript '%ls'", sss.wzKey); 217 ExitOnFailure(hr, "Failed to open Wix4SqlScript.BinaryScript_ for SqlScript '%ls'", sss.wzKey);
218 hr = WcaFetchSingleRecord(hViewBinary, &hRecBinary); 218 hr = WcaFetchSingleRecord(hViewBinary, &hRecBinary);
219 ExitOnFailure(hr, "Failed to fetch SqlScript.BinaryScript_ for SqlScript '%ls'", sss.wzKey); 219 ExitOnFailure(hr, "Failed to fetch Wix4SqlScript.BinaryScript_ for SqlScript '%ls'", sss.wzKey);
220 220
221 // Note: We need to allocate an extra character on the stream to NULL terminate the SQL script. 221 // Note: We need to allocate an extra character on the stream to NULL terminate the SQL script.
222 // The WcaGetRecordStream() function won't let us add extra space on the end of the stream 222 // The WcaGetRecordStream() function won't let us add extra space on the end of the stream
223 // so we'll read the stream "the old fashioned way". 223 // so we'll read the stream "the old fashioned way".
224 //hr = WcaGetRecordStream(hRecBinary, ssbsqData, (BYTE**)&pbScript, &cbScript); 224 //hr = WcaGetRecordStream(hRecBinary, ssbsqData, (BYTE**)&pbScript, &cbScript);
225 //ExitOnFailure(hr, "Failed to read SqlScript.BinaryScript_ for SqlScript '%ls'", sss.wzKey); 225 //ExitOnFailure(hr, "Failed to read Wix4SqlScript.BinaryScript_ for SqlScript '%ls'", sss.wzKey);
226 er = ::MsiRecordReadStream(hRecBinary, ssbsqData, NULL, &cbRead); 226 er = ::MsiRecordReadStream(hRecBinary, ssbsqData, NULL, &cbRead);
227 hr = HRESULT_FROM_WIN32(er); 227 hr = HRESULT_FROM_WIN32(er);
228 ExitOnFailure(hr, "failed to get size of stream"); 228 ExitOnFailure(hr, "failed to get size of stream");
@@ -472,7 +472,7 @@ HRESULT ScaSqlStrsReadScripts(
472 { 472 {
473 hr = S_OK; 473 hr = S_OK;
474 } 474 }
475 ExitOnFailure(hr, "Failure occured while reading SqlString table"); 475 ExitOnFailure(hr, "Failure occured while reading Wix4SqlScript table");
476 476
477LExit: 477LExit:
478 // if anything was left over after an error clean it all up 478 // if anything was left over after an error clean it all up
diff --git a/src/ca/scasqlstr.h b/src/ca/scasqlstr.h
index a6f6df1c..72c1d770 100644
--- a/src/ca/scasqlstr.h
+++ b/src/ca/scasqlstr.h
@@ -18,7 +18,7 @@ struct SCA_SQLSTR
18 18
19 LPWSTR pwzSql; 19 LPWSTR pwzSql;
20 int iAttributes; 20 int iAttributes;
21 int iSequence; //used to sequence SqlString and SqlScript tables together 21 int iSequence; //used to sequence Wix4SqlString and Wix4SqlScript tables together
22 22
23 SCA_SQLSTR* psssNext; 23 SCA_SQLSTR* psssNext;
24}; 24};
diff --git a/src/test/WixToolsetTest.Sql/SqlExtensionFixture.cs b/src/test/WixToolsetTest.Sql/SqlExtensionFixture.cs
index 7d51c0fb..aa9d7a1f 100644
--- a/src/test/WixToolsetTest.Sql/SqlExtensionFixture.cs
+++ b/src/test/WixToolsetTest.Sql/SqlExtensionFixture.cs
@@ -11,15 +11,19 @@ namespace WixToolsetTest.Sql
11 public class SqlExtensionFixture 11 public class SqlExtensionFixture
12 { 12 {
13 [Fact] 13 [Fact]
14 public void CanBuildUsingSqlString() 14 public void CanBuildUsingSqlStuff()
15 { 15 {
16 var folder = TestData.Get(@"TestData\UsingSql"); 16 var folder = TestData.Get(@"TestData\UsingSql");
17 var build = new Builder(folder, typeof(SqlExtensionFactory), new[] { folder }); 17 var build = new Builder(folder, typeof(SqlExtensionFactory), new[] { folder });
18 18
19 var results = build.BuildAndQuery(Build, "SqlString"); 19 var results = build.BuildAndQuery(Build, "Wix4SqlDatabase", "Wix4SqlFileSpec", "Wix4SqlScript", "Wix4SqlString");
20 Assert.Equal(new[] 20 WixAssert.CompareLineByLine(new[]
21 { 21 {
22 "SqlString:TestString\tTestDB\tfilF5_pLhBuF5b4N9XEo52g_hUM5Lo\tCREATE TABLE TestTable1(name varchar(20), value varchar(20))\t\t1\t", 22 "Wix4SqlDatabase:TestDB\tMySQLHostName\tMyInstanceName\tMyDB\tDatabaseComponent\t\tTestFileSpecId\tTestLogFileSpecId\t35",
23 "Wix4SqlFileSpec:TestFileSpecId\tTestFileSpecLogicalName\tTestFileSpec\t10MB\t100MB\t10%",
24 "Wix4SqlFileSpec:TestLogFileSpecId\tTestLogFileSpecLogicalName\tTestLogFileSpec\t1MB\t10MB\t1%",
25 "Wix4SqlScript:TestScript\tTestDB\tDatabaseComponent\tScriptBinary\t\t1\t",
26 "Wix4SqlString:TestString\tTestDB\tDatabaseComponent\tCREATE TABLE TestTable1(name varchar(20), value varchar(20))\t\t1\t",
23 }, results.ToArray()); 27 }, results.ToArray());
24 } 28 }
25 29
diff --git a/src/test/WixToolsetTest.Sql/TestData/UsingSql/PackageComponents.wxs b/src/test/WixToolsetTest.Sql/TestData/UsingSql/PackageComponents.wxs
index 653f7e02..f7626926 100644
--- a/src/test/WixToolsetTest.Sql/TestData/UsingSql/PackageComponents.wxs
+++ b/src/test/WixToolsetTest.Sql/TestData/UsingSql/PackageComponents.wxs
@@ -2,12 +2,20 @@
2<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" 2<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs"
3 xmlns:sql="http://wixtoolset.org/schemas/v4/wxs/sql"> 3 xmlns:sql="http://wixtoolset.org/schemas/v4/wxs/sql">
4 <Fragment> 4 <Fragment>
5 <Binary Id="ScriptBinary" SourceFile="example.txt" />
6
5 <ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER"> 7 <ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER">
6 <Component> 8 <Component Id="DatabaseComponent" Guid="{322802E7-D65E-4C91-924F-FC6D30FEEB34}">
7 <File Source="example.txt" /> 9 <File Id="TestFileSpec" Source="example.txt" />
10 <File Id="TestLogFileSpec" Source="example.txt" />
11
8 <sql:SqlDatabase Id="TestDB" Database="MyDB" Server="MySQLHostName" Instance="MyInstanceName" CreateOnInstall="yes" DropOnUninstall="yes" ConfirmOverwrite="yes"> 12 <sql:SqlDatabase Id="TestDB" Database="MyDB" Server="MySQLHostName" Instance="MyInstanceName" CreateOnInstall="yes" DropOnUninstall="yes" ConfirmOverwrite="yes">
9 <sql:SqlString Id="TestString" SQL="CREATE TABLE TestTable1(name varchar(20), value varchar(20))" ExecuteOnInstall="yes" /> 13 <sql:SqlString Id="TestString" SQL="CREATE TABLE TestTable1(name varchar(20), value varchar(20))" ExecuteOnInstall="yes" />
14 <sql:SqlFileSpec Id="TestFileSpecId" Filename="TestFileSpec" Name="TestFileSpecLogicalName" Size="10MB" GrowthSize="10%" MaxSize="100MB" />
15 <sql:SqlLogFileSpec Id="TestLogFileSpecId" Filename="TestLogFileSpec" Name="TestLogFileSpecLogicalName" Size="1MB" GrowthSize="1%" MaxSize="10MB" />
10 </sql:SqlDatabase> 16 </sql:SqlDatabase>
17
18 <sql:SqlScript Id="TestScript" BinaryRef="ScriptBinary" SqlDb="TestDB" ExecuteOnInstall="yes" />
11 </Component> 19 </Component>
12 </ComponentGroup> 20 </ComponentGroup>
13 </Fragment> 21 </Fragment>
diff --git a/src/wixext/SqlTableDefinitions.cs b/src/wixext/SqlTableDefinitions.cs
index 0ab6f989..029a092e 100644
--- a/src/wixext/SqlTableDefinitions.cs
+++ b/src/wixext/SqlTableDefinitions.cs
@@ -7,7 +7,7 @@ namespace WixToolset.Sql
7 public static class SqlTableDefinitions 7 public static class SqlTableDefinitions
8 { 8 {
9 public static readonly TableDefinition SqlDatabase = new TableDefinition( 9 public static readonly TableDefinition SqlDatabase = new TableDefinition(
10 "SqlDatabase", 10 "Wix4SqlDatabase",
11 SqlSymbolDefinitions.SqlDatabase, 11 SqlSymbolDefinitions.SqlDatabase,
12 new[] 12 new[]
13 { 13 {
@@ -17,15 +17,15 @@ namespace WixToolset.Sql
17 new ColumnDefinition("Database", ColumnType.String, 255, primaryKey: false, nullable: false, ColumnCategory.Formatted, description: "Primary key, name of database in a SQL Server"), 17 new ColumnDefinition("Database", ColumnType.String, 255, primaryKey: false, nullable: false, ColumnCategory.Formatted, description: "Primary key, name of database in a SQL Server"),
18 new ColumnDefinition("Component_", ColumnType.String, 72, primaryKey: false, nullable: true, ColumnCategory.Identifier, keyTable: "Component", keyColumn: 1, description: "Foreign key, Component used to determine install state ", modularizeType: ColumnModularizeType.Column), 18 new ColumnDefinition("Component_", ColumnType.String, 72, primaryKey: false, nullable: true, ColumnCategory.Identifier, keyTable: "Component", keyColumn: 1, description: "Foreign key, Component used to determine install state ", modularizeType: ColumnModularizeType.Column),
19 new ColumnDefinition("User_", ColumnType.String, 72, primaryKey: false, nullable: true, ColumnCategory.Identifier, keyTable: "User", keyColumn: 1, description: "Foreign key, User used to log into database", modularizeType: ColumnModularizeType.Column), 19 new ColumnDefinition("User_", ColumnType.String, 72, primaryKey: false, nullable: true, ColumnCategory.Identifier, keyTable: "User", keyColumn: 1, description: "Foreign key, User used to log into database", modularizeType: ColumnModularizeType.Column),
20 new ColumnDefinition("FileSpec_", ColumnType.String, 72, primaryKey: false, nullable: true, ColumnCategory.Identifier, keyTable: "SqlFileSpec", keyColumn: 1, description: "Foreign key referencing SqlFileSpec.", modularizeType: ColumnModularizeType.Column), 20 new ColumnDefinition("FileSpec_", ColumnType.String, 72, primaryKey: false, nullable: true, ColumnCategory.Identifier, keyTable: "Wix4SqlFileSpec", keyColumn: 1, description: "Foreign key referencing SqlFileSpec.", modularizeType: ColumnModularizeType.Column),
21 new ColumnDefinition("FileSpec_Log", ColumnType.String, 72, primaryKey: false, nullable: true, ColumnCategory.Identifier, keyTable: "SqlFileSpec", keyColumn: 1, description: "Foreign key referencing SqlFileSpec.", modularizeType: ColumnModularizeType.Column), 21 new ColumnDefinition("FileSpec_Log", ColumnType.String, 72, primaryKey: false, nullable: true, ColumnCategory.Identifier, keyTable: "Wix4SqlFileSpec", keyColumn: 1, description: "Foreign key referencing SqlFileSpec.", modularizeType: ColumnModularizeType.Column),
22 new ColumnDefinition("Attributes", ColumnType.Number, 2, primaryKey: false, nullable: true, ColumnCategory.Unknown, minValue: 0, maxValue: 255, description: "1 == create on install, 2 == drop on uninstall, 4 == continue on error, 8 == drop on install, 16 == create on uninstall, 32 == confirm update existing table, 64 == create on reinstall, 128 == drop on reinstall"), 22 new ColumnDefinition("Attributes", ColumnType.Number, 2, primaryKey: false, nullable: true, ColumnCategory.Unknown, minValue: 0, maxValue: 255, description: "1 == create on install, 2 == drop on uninstall, 4 == continue on error, 8 == drop on install, 16 == create on uninstall, 32 == confirm update existing table, 64 == create on reinstall, 128 == drop on reinstall"),
23 }, 23 },
24 symbolIdIsPrimaryKey: true 24 symbolIdIsPrimaryKey: true
25 ); 25 );
26 26
27 public static readonly TableDefinition SqlFileSpec = new TableDefinition( 27 public static readonly TableDefinition SqlFileSpec = new TableDefinition(
28 "SqlFileSpec", 28 "Wix4SqlFileSpec",
29 SqlSymbolDefinitions.SqlFileSpec, 29 SqlSymbolDefinitions.SqlFileSpec,
30 new[] 30 new[]
31 { 31 {
@@ -40,12 +40,12 @@ namespace WixToolset.Sql
40 ); 40 );
41 41
42 public static readonly TableDefinition SqlScript = new TableDefinition( 42 public static readonly TableDefinition SqlScript = new TableDefinition(
43 "SqlScript", 43 "Wix4SqlScript",
44 SqlSymbolDefinitions.SqlScript, 44 SqlSymbolDefinitions.SqlScript,
45 new[] 45 new[]
46 { 46 {
47 new ColumnDefinition("Script", ColumnType.String, 72, primaryKey: true, nullable: false, ColumnCategory.Identifier, description: "Primary key, non-localized token"), 47 new ColumnDefinition("Script", ColumnType.String, 72, primaryKey: true, nullable: false, ColumnCategory.Identifier, description: "Primary key, non-localized token"),
48 new ColumnDefinition("SqlDb_", ColumnType.String, 72, primaryKey: false, nullable: false, ColumnCategory.Identifier, keyTable: "SqlDatabase", keyColumn: 1, description: "Foreign key, SQL Server key", modularizeType: ColumnModularizeType.Column), 48 new ColumnDefinition("SqlDb_", ColumnType.String, 72, primaryKey: false, nullable: false, ColumnCategory.Identifier, keyTable: "Wix4SqlDatabase", keyColumn: 1, description: "Foreign key, SQL Server key", modularizeType: ColumnModularizeType.Column),
49 new ColumnDefinition("Component_", ColumnType.String, 72, primaryKey: false, nullable: false, ColumnCategory.Identifier, keyTable: "Component", keyColumn: 1, description: "Foreign key, Component used to determine install state", modularizeType: ColumnModularizeType.Column), 49 new ColumnDefinition("Component_", ColumnType.String, 72, primaryKey: false, nullable: false, ColumnCategory.Identifier, keyTable: "Component", keyColumn: 1, description: "Foreign key, Component used to determine install state", modularizeType: ColumnModularizeType.Column),
50 new ColumnDefinition("ScriptBinary_", ColumnType.String, 72, primaryKey: false, nullable: false, ColumnCategory.Identifier, keyTable: "Binary", keyColumn: 1, description: "Foreign key, Binary stream that contains SQL Script to execute", modularizeType: ColumnModularizeType.Column), 50 new ColumnDefinition("ScriptBinary_", ColumnType.String, 72, primaryKey: false, nullable: false, ColumnCategory.Identifier, keyTable: "Binary", keyColumn: 1, description: "Foreign key, Binary stream that contains SQL Script to execute", modularizeType: ColumnModularizeType.Column),
51 new ColumnDefinition("User_", ColumnType.String, 72, primaryKey: false, nullable: true, ColumnCategory.Identifier, keyTable: "User", keyColumn: 1, description: "Foreign key, User used to log into database", modularizeType: ColumnModularizeType.Column), 51 new ColumnDefinition("User_", ColumnType.String, 72, primaryKey: false, nullable: true, ColumnCategory.Identifier, keyTable: "User", keyColumn: 1, description: "Foreign key, User used to log into database", modularizeType: ColumnModularizeType.Column),
@@ -56,12 +56,12 @@ namespace WixToolset.Sql
56 ); 56 );
57 57
58 public static readonly TableDefinition SqlString = new TableDefinition( 58 public static readonly TableDefinition SqlString = new TableDefinition(
59 "SqlString", 59 "Wix4SqlString",
60 SqlSymbolDefinitions.SqlString, 60 SqlSymbolDefinitions.SqlString,
61 new[] 61 new[]
62 { 62 {
63 new ColumnDefinition("String", ColumnType.String, 72, primaryKey: true, nullable: false, ColumnCategory.Identifier, description: "Id for the SqlString", modularizeType: ColumnModularizeType.Column), 63 new ColumnDefinition("String", ColumnType.String, 72, primaryKey: true, nullable: false, ColumnCategory.Identifier, description: "Id for the Wix4SqlString", modularizeType: ColumnModularizeType.Column),
64 new ColumnDefinition("SqlDb_", ColumnType.String, 72, primaryKey: false, nullable: false, ColumnCategory.Identifier, keyTable: "SqlDatabase", keyColumn: 1, description: "Foreign key, SQL Server key", modularizeType: ColumnModularizeType.Column), 64 new ColumnDefinition("SqlDb_", ColumnType.String, 72, primaryKey: false, nullable: false, ColumnCategory.Identifier, keyTable: "Wix4SqlDatabase", keyColumn: 1, description: "Foreign key, SQL Server key", modularizeType: ColumnModularizeType.Column),
65 new ColumnDefinition("Component_", ColumnType.String, 72, primaryKey: false, nullable: false, ColumnCategory.Identifier, keyTable: "Component", keyColumn: 1, description: "Foreign key, Component used to determine install state", modularizeType: ColumnModularizeType.Column), 65 new ColumnDefinition("Component_", ColumnType.String, 72, primaryKey: false, nullable: false, ColumnCategory.Identifier, keyTable: "Component", keyColumn: 1, description: "Foreign key, Component used to determine install state", modularizeType: ColumnModularizeType.Column),
66 new ColumnDefinition("SQL", ColumnType.String, 0, primaryKey: false, nullable: false, ColumnCategory.Formatted, description: "SQL query to execute"), 66 new ColumnDefinition("SQL", ColumnType.String, 0, primaryKey: false, nullable: false, ColumnCategory.Formatted, description: "SQL query to execute"),
67 new ColumnDefinition("User_", ColumnType.String, 72, primaryKey: false, nullable: true, ColumnCategory.Identifier, keyTable: "User", keyColumn: 1, description: "Foreign key, User used to log into database", modularizeType: ColumnModularizeType.Column), 67 new ColumnDefinition("User_", ColumnType.String, 72, primaryKey: false, nullable: true, ColumnCategory.Identifier, keyTable: "User", keyColumn: 1, description: "Foreign key, User used to log into database", modularizeType: ColumnModularizeType.Column),