mydatabasepilot-cvs Mailing List for MyDatabase Pilot
Status: Alpha
Brought to you by:
nanoface
You can subscribe to this list here.
| 2003 |
Jan
|
Feb
|
Mar
(3) |
Apr
(40) |
May
(50) |
Jun
(61) |
Jul
(10) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|---|
|
From: <nan...@us...> - 2003-07-18 16:32:16
|
Update of /cvsroot/mydatabasepilot/MyDatabasePilot/dbProcessInit
In directory sc8-pr-cvs1:/tmp/cvs-serv10445/dbProcessInit
Modified Files:
AddField.cfm
Log Message:
Functionality Added:
[ 773748 ] Added Index Length to Varchar, Char, and Text Types
Index: AddField.cfm
===================================================================
RCS file: /cvsroot/mydatabasepilot/MyDatabasePilot/dbProcessInit/AddField.cfm,v
retrieving revision 1.25
retrieving revision 1.26
diff -C2 -d -r1.25 -r1.26
*** AddField.cfm 18 Jul 2003 14:53:25 -0000 1.25
--- AddField.cfm 18 Jul 2003 16:32:13 -0000 1.26
***************
*** 39,42 ****
--- 39,43 ----
<cfparam name="FORM.key#i#" default="None" />
<cfparam name="FORM.indexName#i#" default="" />
+ <cfparam name="FORM.indexLength#i#" default="" />
<cfscript>
***************
*** 56,59 ****
--- 57,61 ----
alterSpec[i].key="#Evaluate("FORM.key#i#")#"; // Create Key "key"
alterSpec[i].indexName="#Trim(Evaluate("FORM.indexName#i#"))#"; // Create Key "indexName"
+ alterSpec[i].indexLength="#Trim(Evaluate("FORM.indexLength#i#"))#"; // Create Key "indexLength"
// Create Key "binary"
***************
*** 107,110 ****
--- 109,113 ----
ArrayAppend(alterSpec, tempStruct); // Add the Temporary Sturcture to alterSpec
}
+
/* Else If its a plain "Index" ... */
else if(alterSpec[i].key IS "Index"){
***************
*** 118,121 ****
--- 121,128 ----
tempStruct.index_col_names=ArrayNew(1);
tempStruct.index_col_names[1]=alterSpec[i].colName;
+
+ // Create index length Array
+ tempStruct.indexLength=ArrayNew(1);
+ tempStruct.indexLength[1]=alterSpec[i].indexLength;
ArrayAppend(alterSpec, tempStruct); // Add the Temporary Sturcture to alterSpec
|
|
From: <nan...@us...> - 2003-07-18 16:32:16
|
Update of /cvsroot/mydatabasepilot/MyDatabasePilot/Query
In directory sc8-pr-cvs1:/tmp/cvs-serv10445/Query
Modified Files:
alterTable.cfm
Log Message:
Functionality Added:
[ 773748 ] Added Index Length to Varchar, Char, and Text Types
Index: alterTable.cfm
===================================================================
RCS file: /cvsroot/mydatabasepilot/MyDatabasePilot/Query/alterTable.cfm,v
retrieving revision 1.28
retrieving revision 1.29
diff -C2 -d -r1.28 -r1.29
*** alterTable.cfm 18 Jul 2003 14:53:25 -0000 1.28
--- alterTable.cfm 18 Jul 2003 16:32:13 -0000 1.29
***************
*** 304,307 ****
--- 304,313 ----
rawSQL = "#rawSQL##ATTRIBUTES.alterSpec[i].index_col_names[j]#";
htmlSQL = "#htmlSQL#<span class=""String"">#ATTRIBUTES.alterSpec[i].index_col_names[j]#</span>";
+
+ // Add Index Length to Output Strings
+ if(ATTRIBUTES.alterSpec[i].indexLength[j] IS NOT ""){
+ rawSQL = "#rawSQL#(#ATTRIBUTES.alterSpec[i].indexLength[j]#)";
+ htmlSQL = "#htmlSQL#(<span class=""String"">#ATTRIBUTES.alterSpec[i].indexLength[j]#</span>)";
+ }
}
}
|
|
From: <nan...@us...> - 2003-07-18 16:32:16
|
Update of /cvsroot/mydatabasepilot/MyDatabasePilot/dbProcessBody In directory sc8-pr-cvs1:/tmp/cvs-serv10445/dbProcessBody Modified Files: AddField.cfm Log Message: Functionality Added: [ 773748 ] Added Index Length to Varchar, Char, and Text Types Index: AddField.cfm =================================================================== RCS file: /cvsroot/mydatabasepilot/MyDatabasePilot/dbProcessBody/AddField.cfm,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** AddField.cfm 18 Jul 2003 14:33:33 -0000 1.16 --- AddField.cfm 18 Jul 2003 16:32:13 -0000 1.17 *************** *** 506,510 **** <cfswitch expression="#alterSpec[i].colType#"> <cfcase value="TINYBLOB,BLOB,MEDIUMBLOB,LONGBLOB,TINYTEXT,TEXT,MEDIUMTEXT,LONGTEXT,CHAR,VARCHAR"> ! <!--- ToDo ---> Length() </cfcase> </cfswitch> --- 506,510 ---- <cfswitch expression="#alterSpec[i].colType#"> <cfcase value="TINYBLOB,BLOB,MEDIUMBLOB,LONGBLOB,TINYTEXT,TEXT,MEDIUMTEXT,LONGTEXT,CHAR,VARCHAR"> ! <label class="Fancy">Length(</label><cfinput name="indexLength#i#" type="text" value="#alterSpec[i].indexLength#" size="3" maxlength="3" range="0,255" required="no" message="The legal range for length is 0-255." validate="integer" class="Fancy" /><label class="Fancy">)</label> </cfcase> </cfswitch> |
|
From: <nan...@us...> - 2003-07-18 14:53:37
|
Update of /cvsroot/mydatabasepilot/MyDatabasePilot/dbProcessInit
In directory sc8-pr-cvs1:/tmp/cvs-serv25361/dbProcessInit
Modified Files:
AddField.cfm
Log Message:
Functionality Added:
[ 773696 ] Added "ADD FULLTEXT" AlterSpec
Index: AddField.cfm
===================================================================
RCS file: /cvsroot/mydatabasepilot/MyDatabasePilot/dbProcessInit/AddField.cfm,v
retrieving revision 1.24
retrieving revision 1.25
diff -C2 -d -r1.24 -r1.25
*** AddField.cfm 18 Jul 2003 14:46:31 -0000 1.24
--- AddField.cfm 18 Jul 2003 14:53:25 -0000 1.25
***************
*** 123,127 ****
/* Else If its a "Fulltext" index ... */
! // else if(alterSpec[i].key IS "Fulltext"){}
</cfscript>
</cfloop>
--- 123,139 ----
/* Else If its a "Fulltext" index ... */
! else if(alterSpec[i].key IS "Fulltext"){
! tempStruct=StructNew(); // Create a Temporary Structure for each new Fulltext index
! tempStruct.format="ADD FULLTEXT"; // Create Key "format"
!
! // Create index name
! tempStruct.indexName=alterSpec[i].indexName;
!
! // Create index column names Array
! tempStruct.index_col_names=ArrayNew(1);
! tempStruct.index_col_names[1]=alterSpec[i].colName;
!
! ArrayAppend(alterSpec, tempStruct); // Add the Temporary Sturcture to alterSpec
! }
</cfscript>
</cfloop>
|
|
From: <nan...@us...> - 2003-07-18 14:53:33
|
Update of /cvsroot/mydatabasepilot/MyDatabasePilot/Query
In directory sc8-pr-cvs1:/tmp/cvs-serv25361/Query
Modified Files:
alterTable.cfm
Log Message:
Functionality Added:
[ 773696 ] Added "ADD FULLTEXT" AlterSpec
Index: alterTable.cfm
===================================================================
RCS file: /cvsroot/mydatabasepilot/MyDatabasePilot/Query/alterTable.cfm,v
retrieving revision 1.27
retrieving revision 1.28
diff -C2 -d -r1.27 -r1.28
*** alterTable.cfm 18 Jul 2003 14:46:31 -0000 1.27
--- alterTable.cfm 18 Jul 2003 14:53:25 -0000 1.28
***************
*** 272,276 ****
<cfcase value="ADD INDEX">
<cfscript>
! // Add "ADD UNIQUE" Keywords to Output Strings
rawSQL = "#rawSQL# ADD INDEX";
htmlSQL = "#htmlSQL#<br /><span class=""KeyWord"">ADD INDEX</span>";
--- 272,276 ----
<cfcase value="ADD INDEX">
<cfscript>
! // Add "ADD INDEX" Keywords to Output Strings
rawSQL = "#rawSQL# ADD INDEX";
htmlSQL = "#htmlSQL#<br /><span class=""KeyWord"">ADD INDEX</span>";
***************
*** 359,364 ****
</cfscript>
</cfcase>
<!--- "ADD FULLTEXT" Alter Specification --->
! <!--- ToDo ---> <cfcase value="ADD FULLTEXT"></cfcase>
<!--- "ADD FOREIGN KEY" Alter Specification --->
<!--- ToDo ---> <cfcase value="ADD FOREIGN KEY"></cfcase>
--- 359,406 ----
</cfscript>
</cfcase>
+
<!--- "ADD FULLTEXT" Alter Specification --->
! <cfcase value="ADD FULLTEXT">
! <cfscript>
! // Add "ADD FULLTEXT" Keywords to Output Strings
! rawSQL = "#rawSQL# ADD FULLTEXT";
! htmlSQL = "#htmlSQL#<br /><span class=""KeyWord"">ADD FULLTEXT</span>";
!
! // Add indexName to Output Strings
! rawSQL = "#rawSQL# #ATTRIBUTES.alterSpec[i].indexName#";
! htmlSQL = "#htmlSQL# <span class=""String"">#ATTRIBUTES.alterSpec[i].indexName#</span>";
!
! //-----------------------------------------
! // Add Index Column Names to Output Strings
! //-----------------------------------------
!
! // Add Opening Bracked to Output Strings
! rawSQL = "#rawSQL# (";
! htmlSQL = "#htmlSQL# (";
!
! // Add Index Column Names to Output Strings
! for(j=1; j EQ arrayLen(ATTRIBUTES.alterSpec[i].index_col_names); j=j+1){
! // If this is a multi column index and is not the first Index Column Name, then add a comma to the last Index Column Name
! if(j GT 1){
! rawSQL = "#rawSQL#,";
! htmlSQL = "#htmlSQL#,";
! }
!
! // Add Index Column Name to Output Strings
! if(ATTRIBUTES.alterSpec[i].index_col_names[j] IS ""){
! rawSQL = "#rawSQL#NameNotSpecified";
! htmlSQL = "#htmlSQL#<span class=""Missing"">NameNotSpecified</span>";
! }
! else{
! rawSQL = "#rawSQL##ATTRIBUTES.alterSpec[i].index_col_names[j]#";
! htmlSQL = "#htmlSQL#<span class=""String"">#ATTRIBUTES.alterSpec[i].index_col_names[j]#</span>";
! }
! }
!
! // Add Closing Bracked to Output Strings
! rawSQL = "#rawSQL#)";
! htmlSQL = "#htmlSQL#)";
! </cfscript>
! </cfcase>
<!--- "ADD FOREIGN KEY" Alter Specification --->
<!--- ToDo ---> <cfcase value="ADD FOREIGN KEY"></cfcase>
|
|
From: <nan...@us...> - 2003-07-18 14:46:34
|
Update of /cvsroot/mydatabasepilot/MyDatabasePilot/dbProcessInit
In directory sc8-pr-cvs1:/tmp/cvs-serv24296/dbProcessInit
Modified Files:
AddField.cfm
Log Message:
Functionality Added:
[ 773691 ] Added "ADD INDEX" AlterSpec
Index: AddField.cfm
===================================================================
RCS file: /cvsroot/mydatabasepilot/MyDatabasePilot/dbProcessInit/AddField.cfm,v
retrieving revision 1.23
retrieving revision 1.24
diff -C2 -d -r1.23 -r1.24
*** AddField.cfm 18 Jul 2003 14:33:33 -0000 1.23
--- AddField.cfm 18 Jul 2003 14:46:31 -0000 1.24
***************
*** 108,112 ****
}
/* Else If its a plain "Index" ... */
! // else if(alterSpec[i].key IS "Index"){}
/* Else If its a "Fulltext" index ... */
--- 108,124 ----
}
/* Else If its a plain "Index" ... */
! else if(alterSpec[i].key IS "Index"){
! tempStruct=StructNew(); // Create a Temporary Structure for each new plain index
! tempStruct.format="ADD INDEX"; // Create Key "format"
!
! // Create index name
! tempStruct.indexName=alterSpec[i].indexName;
!
! // Create index column names Array
! tempStruct.index_col_names=ArrayNew(1);
! tempStruct.index_col_names[1]=alterSpec[i].colName;
!
! ArrayAppend(alterSpec, tempStruct); // Add the Temporary Sturcture to alterSpec
! }
/* Else If its a "Fulltext" index ... */
|
|
From: <nan...@us...> - 2003-07-18 14:46:34
|
Update of /cvsroot/mydatabasepilot/MyDatabasePilot/Query
In directory sc8-pr-cvs1:/tmp/cvs-serv24296/Query
Modified Files:
alterTable.cfm
Log Message:
Functionality Added:
[ 773691 ] Added "ADD INDEX" AlterSpec
Index: alterTable.cfm
===================================================================
RCS file: /cvsroot/mydatabasepilot/MyDatabasePilot/Query/alterTable.cfm,v
retrieving revision 1.26
retrieving revision 1.27
diff -C2 -d -r1.26 -r1.27
*** alterTable.cfm 18 Jul 2003 14:33:32 -0000 1.26
--- alterTable.cfm 18 Jul 2003 14:46:31 -0000 1.27
***************
*** 268,275 ****
</cfscript>
</cfcase>
<!--- "ADD INDEX" Alter Specification --->
! <!--- ToDo ---> <cfcase value="ADD INDEX"></cfcase>
<!--- "ADD PRIMARY KEY" Alter Specification --->
<!--- ToDo ---> <cfcase value="ADD PRIMARY KEY"></cfcase>
<!--- "ADD UNIQUE" Alter Specification --->
<cfcase value="ADD UNIQUE">
--- 268,319 ----
</cfscript>
</cfcase>
+
<!--- "ADD INDEX" Alter Specification --->
! <cfcase value="ADD INDEX">
! <cfscript>
! // Add "ADD UNIQUE" Keywords to Output Strings
! rawSQL = "#rawSQL# ADD INDEX";
! htmlSQL = "#htmlSQL#<br /><span class=""KeyWord"">ADD INDEX</span>";
!
! // Add indexName to Output Strings
! rawSQL = "#rawSQL# #ATTRIBUTES.alterSpec[i].indexName#";
! htmlSQL = "#htmlSQL# <span class=""String"">#ATTRIBUTES.alterSpec[i].indexName#</span>";
!
! //-----------------------------------------
! // Add Index Column Names to Output Strings
! //-----------------------------------------
!
! // Add Opening Bracked to Output Strings
! rawSQL = "#rawSQL# (";
! htmlSQL = "#htmlSQL# (";
!
! // Add Index Column Names to Output Strings
! for(j=1; j EQ arrayLen(ATTRIBUTES.alterSpec[i].index_col_names); j=j+1){
! // If this is a multi column index and is not the first Index Column Name, then add a comma to the last Index Column Name
! if(j GT 1){
! rawSQL = "#rawSQL#,";
! htmlSQL = "#htmlSQL#,";
! }
!
! // Add Index Column Name to Output Strings
! if(ATTRIBUTES.alterSpec[i].index_col_names[j] IS ""){
! rawSQL = "#rawSQL#NameNotSpecified";
! htmlSQL = "#htmlSQL#<span class=""Missing"">NameNotSpecified</span>";
! }
! else{
! rawSQL = "#rawSQL##ATTRIBUTES.alterSpec[i].index_col_names[j]#";
! htmlSQL = "#htmlSQL#<span class=""String"">#ATTRIBUTES.alterSpec[i].index_col_names[j]#</span>";
! }
! }
!
! // Add Closing Bracked to Output Strings
! rawSQL = "#rawSQL#)";
! htmlSQL = "#htmlSQL#)";
! </cfscript>
! </cfcase>
!
<!--- "ADD PRIMARY KEY" Alter Specification --->
<!--- ToDo ---> <cfcase value="ADD PRIMARY KEY"></cfcase>
+
<!--- "ADD UNIQUE" Alter Specification --->
<cfcase value="ADD UNIQUE">
|
|
From: <nan...@us...> - 2003-07-18 14:33:36
|
Update of /cvsroot/mydatabasepilot/MyDatabasePilot/dbProcessBody In directory sc8-pr-cvs1:/tmp/cvs-serv22428/dbProcessBody Modified Files: AddField.cfm Log Message: Functionality Added: [ 773682 ] Added indexName to Unique Indexes Index: AddField.cfm =================================================================== RCS file: /cvsroot/mydatabasepilot/MyDatabasePilot/dbProcessBody/AddField.cfm,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** AddField.cfm 30 Jun 2003 21:09:12 -0000 1.15 --- AddField.cfm 18 Jul 2003 14:33:33 -0000 1.16 *************** *** 517,520 **** --- 517,526 ---- <cfinput name="key#i#" type="radio" value="None" /><label class="Fancy">None</label> </cfif> + <br /> + + <!--- Index Name ---> + <label class="Fancy">Index Name:</label> + <cfinput name="indexName#i#" type="text" value="#alterSpec[i].indexName#" size="20" maxlength="64" required="no" class="Fancy" /> + <label class="Fancy">(Optional for Unique, Fulltext, and Plain Index)</label> </td> </tr> |
|
From: <nan...@us...> - 2003-07-18 14:33:36
|
Update of /cvsroot/mydatabasepilot/MyDatabasePilot/Query In directory sc8-pr-cvs1:/tmp/cvs-serv22428/Query Modified Files: alterTable.cfm Log Message: Functionality Added: [ 773682 ] Added indexName to Unique Indexes Index: alterTable.cfm =================================================================== RCS file: /cvsroot/mydatabasepilot/MyDatabasePilot/Query/alterTable.cfm,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** alterTable.cfm 30 Jun 2003 21:09:12 -0000 1.25 --- alterTable.cfm 18 Jul 2003 14:33:32 -0000 1.26 *************** *** 268,276 **** </cfscript> </cfcase> - <!--- ToDo Cases: ---> <!--- "ADD INDEX" Alter Specification ---> ! <cfcase value="ADD INDEX"></cfcase> <!--- "ADD PRIMARY KEY" Alter Specification ---> ! <cfcase value="ADD PRIMARY KEY"></cfcase> <!--- "ADD UNIQUE" Alter Specification ---> <cfcase value="ADD UNIQUE"> --- 268,275 ---- </cfscript> </cfcase> <!--- "ADD INDEX" Alter Specification ---> ! <!--- ToDo ---> <cfcase value="ADD INDEX"></cfcase> <!--- "ADD PRIMARY KEY" Alter Specification ---> ! <!--- ToDo ---> <cfcase value="ADD PRIMARY KEY"></cfcase> <!--- "ADD UNIQUE" Alter Specification ---> <cfcase value="ADD UNIQUE"> *************** *** 280,284 **** htmlSQL = "#htmlSQL#<br /><span class=""KeyWord"">ADD UNIQUE</span>"; ! // ToDo [index_name] //----------------------------------------- --- 279,285 ---- htmlSQL = "#htmlSQL#<br /><span class=""KeyWord"">ADD UNIQUE</span>"; ! // Add indexName to Output Strings ! rawSQL = "#rawSQL# #ATTRIBUTES.alterSpec[i].indexName#"; ! htmlSQL = "#htmlSQL# <span class=""String"">#ATTRIBUTES.alterSpec[i].indexName#</span>"; //----------------------------------------- *************** *** 315,343 **** </cfcase> <!--- "ADD FULLTEXT" Alter Specification ---> ! <cfcase value="ADD FULLTEXT"></cfcase> <!--- "ADD FOREIGN KEY" Alter Specification ---> ! <cfcase value="ADD FOREIGN KEY"></cfcase> <!--- "ALTER COLUMN" Alter Specification ---> ! <cfcase value="ALTER COLUMN"></cfcase> <!--- "CHANGE COLUMN" Alter Specification ---> ! <cfcase value="CHANGE COLUMN"></cfcase> <!--- "MODIFY COLUMN" Alter Specification ---> ! <cfcase value="MODIFY COLUMN"></cfcase> <!--- "DROP COLUMN" Alter Specification ---> ! <cfcase value="DROP COLUMN"></cfcase> <!--- "DROP PRIMARY KEY" Alter Specification ---> ! <cfcase value="DROP PRIMARY KEY"></cfcase> <!--- "DROP INDEX" Alter Specification ---> ! <cfcase value="DROP INDEX"></cfcase> <!--- "DISABLE KEYS" Alter Specification ---> ! <cfcase value="DISABLE KEYS"></cfcase> <!--- "ENABLE KEYS" Alter Specification ---> ! <cfcase value="ENABLE KEYS"></cfcase> <!--- "RENAME TO" Alter Specification ---> ! <cfcase value="RENAME TO"></cfcase> <!--- "ORDER BY" Alter Specification ---> ! <cfcase value="ORDER BY"></cfcase> <!--- "table_options" Alter Specification ---> ! <cfcase value="table_options"></cfcase> </cfswitch> </cfloop> --- 316,344 ---- </cfcase> <!--- "ADD FULLTEXT" Alter Specification ---> ! <!--- ToDo ---> <cfcase value="ADD FULLTEXT"></cfcase> <!--- "ADD FOREIGN KEY" Alter Specification ---> ! <!--- ToDo ---> <cfcase value="ADD FOREIGN KEY"></cfcase> <!--- "ALTER COLUMN" Alter Specification ---> ! <!--- ToDo ---> <cfcase value="ALTER COLUMN"></cfcase> <!--- "CHANGE COLUMN" Alter Specification ---> ! <!--- ToDo ---> <cfcase value="CHANGE COLUMN"></cfcase> <!--- "MODIFY COLUMN" Alter Specification ---> ! <!--- ToDo ---> <cfcase value="MODIFY COLUMN"></cfcase> <!--- "DROP COLUMN" Alter Specification ---> ! <!--- ToDo ---> <cfcase value="DROP COLUMN"></cfcase> <!--- "DROP PRIMARY KEY" Alter Specification ---> ! <!--- ToDo ---> <cfcase value="DROP PRIMARY KEY"></cfcase> <!--- "DROP INDEX" Alter Specification ---> ! <!--- ToDo ---> <cfcase value="DROP INDEX"></cfcase> <!--- "DISABLE KEYS" Alter Specification ---> ! <!--- ToDo ---> <cfcase value="DISABLE KEYS"></cfcase> <!--- "ENABLE KEYS" Alter Specification ---> ! <!--- ToDo ---> <cfcase value="ENABLE KEYS"></cfcase> <!--- "RENAME TO" Alter Specification ---> ! <!--- ToDo ---> <cfcase value="RENAME TO"></cfcase> <!--- "ORDER BY" Alter Specification ---> ! <!--- ToDo ---> <cfcase value="ORDER BY"></cfcase> <!--- "table_options" Alter Specification ---> ! <!--- ToDo ---> <cfcase value="table_options"></cfcase> </cfswitch> </cfloop> |
|
From: <nan...@us...> - 2003-07-18 14:33:36
|
Update of /cvsroot/mydatabasepilot/MyDatabasePilot/dbProcessInit
In directory sc8-pr-cvs1:/tmp/cvs-serv22428/dbProcessInit
Modified Files:
AddField.cfm
Log Message:
Functionality Added:
[ 773682 ] Added indexName to Unique Indexes
Index: AddField.cfm
===================================================================
RCS file: /cvsroot/mydatabasepilot/MyDatabasePilot/dbProcessInit/AddField.cfm,v
retrieving revision 1.22
retrieving revision 1.23
diff -C2 -d -r1.22 -r1.23
*** AddField.cfm 30 Jun 2003 19:58:59 -0000 1.22
--- AddField.cfm 18 Jul 2003 14:33:33 -0000 1.23
***************
*** 38,41 ****
--- 38,42 ----
<cfparam name="FORM.defaultValue#i#" default="" />
<cfparam name="FORM.key#i#" default="None" />
+ <cfparam name="FORM.indexName#i#" default="" />
<cfscript>
***************
*** 54,57 ****
--- 55,59 ----
alterSpec[i].defaultValue="#Trim(Evaluate("FORM.defaultValue#i#"))#"; // Create Key "defaultValue"
alterSpec[i].key="#Evaluate("FORM.key#i#")#"; // Create Key "key"
+ alterSpec[i].indexName="#Trim(Evaluate("FORM.indexName#i#"))#"; // Create Key "indexName"
// Create Key "binary"
***************
*** 96,100 ****
tempStruct.format="ADD UNIQUE"; // Create Key "format"
! // ToDo [index_name]
// Create index column names Array
--- 98,103 ----
tempStruct.format="ADD UNIQUE"; // Create Key "format"
! // Create index name
! tempStruct.indexName=alterSpec[i].indexName;
// Create index column names Array
|
|
From: <nan...@us...> - 2003-06-30 21:09:15
|
Update of /cvsroot/mydatabasepilot/MyDatabasePilot/dbProcessBody In directory sc8-pr-cvs1:/tmp/cvs-serv8802/dbProcessBody Modified Files: AddField.cfm Log Message: Functionality Added: [ 763489 ] Added Length to TimeStamp and Year datatypes Index: AddField.cfm =================================================================== RCS file: /cvsroot/mydatabasepilot/MyDatabasePilot/dbProcessBody/AddField.cfm,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** AddField.cfm 30 Jun 2003 20:31:38 -0000 1.14 --- AddField.cfm 30 Jun 2003 21:09:12 -0000 1.15 *************** *** 452,456 **** </cfif> <label class="Fancy">)</label> ! </nobr> </cfif> --- 452,456 ---- </cfif> <label class="Fancy">)</label> ! </nobr><br /> </cfif> |
|
From: <nan...@us...> - 2003-06-30 21:09:15
|
Update of /cvsroot/mydatabasepilot/MyDatabasePilot/Query
In directory sc8-pr-cvs1:/tmp/cvs-serv8802/Query
Modified Files:
alterTable.cfm
Log Message:
Functionality Added:
[ 763489 ] Added Length to TimeStamp and Year datatypes
Index: alterTable.cfm
===================================================================
RCS file: /cvsroot/mydatabasepilot/MyDatabasePilot/Query/alterTable.cfm,v
retrieving revision 1.24
retrieving revision 1.25
diff -C2 -d -r1.24 -r1.25
*** alterTable.cfm 27 Jun 2003 14:14:17 -0000 1.24
--- alterTable.cfm 30 Jun 2003 21:09:12 -0000 1.25
***************
*** 167,172 ****
// Set Temporal Type to TRUE
isTemporalCol = TRUE;
break;
- // todo Timestamp and Year Length
}
}
--- 167,177 ----
// Set Temporal Type to TRUE
isTemporalCol = TRUE;
+
+ // Add Length to Output Strings if Specified
+ if((ATTRIBUTES.alterSpec[i].colType IS "TIMESTAMP" OR ATTRIBUTES.alterSpec[i].colType IS "YEAR") AND ATTRIBUTES.alterSpec[i].length IS NOT ""){
+ rawSQL = "#rawSQL#(#ATTRIBUTES.alterSpec[i].length#)";
+ htmlSQL = "#htmlSQL#(<span class=""Number"">#ATTRIBUTES.alterSpec[i].length#</span>)";
+ }
break;
}
}
|
|
From: <nan...@us...> - 2003-06-30 20:31:41
|
Update of /cvsroot/mydatabasepilot/MyDatabasePilot/dbProcessBody In directory sc8-pr-cvs1:/tmp/cvs-serv1620/dbProcessBody Modified Files: AddField.cfm Log Message: Cosmetic Change: [ 763466 ] Moved Default Value Column to be included with Field Name and Field Type Index: AddField.cfm =================================================================== RCS file: /cvsroot/mydatabasepilot/MyDatabasePilot/dbProcessBody/AddField.cfm,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** AddField.cfm 26 Jun 2003 19:15:47 -0000 1.13 --- AddField.cfm 30 Jun 2003 20:31:38 -0000 1.14 *************** *** 54,60 **** <tr> <td><label class="Fancy">Field No:</label></td> ! <td><label class="Fancy">Field Name and Type:</label></td> <td><label class="Fancy">Field Options:</label></td> - <td><label class="Fancy">Default Value:</label></td> <td><label class="Fancy">Index:</label></td> </tr> --- 54,59 ---- <tr> <td><label class="Fancy">Field No:</label></td> ! <td><label class="Fancy">Field Name, Type, Default:</label></td> <td><label class="Fancy">Field Options:</label></td> <td><label class="Fancy">Index:</label></td> </tr> *************** *** 68,264 **** <td><label class="Fancy">#i#</label></td> ! <!---||| Allow User to Specify the Fields Name |||---> <!--- If the form has been resubmitted by an onChange event than the original values for this form will be used ---> <td> ! <!--- Field Name ---> ! <!---***Add validate="regular_expression" to below, to ensure user entered a valid field name***---> ! <cfinput name="fieldName#i#" type="text" value="#alterSpec[i].colName#" size="20" maxlength="64" required="yes" message="You must enter a valid field name for New Field number #i#." class="Fancy" /><br /> ! <!--- Field Type ---> ! <cfselect name="fieldType#i#" size="1" required="yes" class="Fancy" onChange="this.form.submit()"> ! <!--- Check to see if empty option was selected, and reselect it accordingly ---> ! <cfif alterSpec[i].colType IS ""> ! <option value="Empty" selected class="Fancy"></option> ! <cfelse> ! <option value="Empty" class="Fancy"></option> ! </cfif> ! <optgroup label="String" class="Fancy"> ! <!--- Check to see if VARCHAR option was selected, and reselect it accordingly ---> ! <cfif alterSpec[i].colType IS "VARCHAR"> ! <option value="VARCHAR" selected class="Fancy">VARCHAR(m)</option> ! <cfelse> ! <option value="VARCHAR" class="Fancy">VARCHAR(m)</option> ! </cfif> ! ! <!--- Check to see if CHAR option was selected, and reselect it accordingly ---> ! <cfif alterSpec[i].colType IS "CHAR"> ! <option value="CHAR" selected class="Fancy">CHAR(m)</option> ! <cfelse> ! <option value="CHAR" class="Fancy">CHAR(m)</option> ! </cfif> ! ! <!--- Check to see if TINYBLOB option was selected, and reselect it accordingly ---> ! <cfif alterSpec[i].colType IS "TINYBLOB"> ! <option value="TINYBLOB" selected class="Fancy">TINYBLOB</option> ! <cfelse> ! <option value="TINYBLOB" class="Fancy">TINYBLOB</option> ! </cfif> ! ! <!--- Check to see if BLOB option was selected, and reselect it accordingly ---> ! <cfif alterSpec[i].colType IS "BLOB"> ! <option value="BLOB" selected class="Fancy">BLOB</option> ! <cfelse> ! <option value="BLOB" class="Fancy">BLOB</option> ! </cfif> ! ! <!--- Check to see if MEDIUMBLOB option was selected, and reselect it accordingly ---> ! <cfif alterSpec[i].colType IS "MEDIUMBLOB"> ! <option value="MEDIUMBLOB" selected class="Fancy">MEDIUMBLOB</option> ! <cfelse> ! <option value="MEDIUMBLOB" class="Fancy">MEDIUMBLOB</option> ! </cfif> ! ! <!--- Check to see if LONGBLOB option was selected, and reselect it accordingly ---> ! <cfif alterSpec[i].colType IS "LONGBLOB"> ! <option value="LONGBLOB" selected class="Fancy">LONGBLOB</option> ! <cfelse> ! <option value="LONGBLOB" class="Fancy">LONGBLOB</option> ! </cfif> ! ! <!--- Check to see if TINYTEXT option was selected, and reselect it accordingly ---> ! <cfif alterSpec[i].colType IS "TINYTEXT"> ! <option value="TINYTEXT" selected class="Fancy">TINYTEXT</option> ! <cfelse> ! <option value="TINYTEXT" class="Fancy">TINYTEXT</option> ! </cfif> ! ! <!--- Check to see if TEXT option was selected, and reselect it accordingly ---> ! <cfif alterSpec[i].colType IS "TEXT"> ! <option value="TEXT" selected class="Fancy">TEXT</option> ! <cfelse> ! <option value="TEXT" class="Fancy">TEXT</option> ! </cfif> ! ! <!--- Check to see if MEDIUMTEXT option was selected, and reselect it accordingly ---> ! <cfif alterSpec[i].colType IS "MEDIUMTEXT"> ! <option value="MEDIUMTEXT" selected class="Fancy">MEDIUMTEXT</option> ! <cfelse> ! <option value="MEDIUMTEXT" class="Fancy">MEDIUMTEXT</option> ! </cfif> ! ! <!--- Check to see if LONGTEXT option was selected, and reselect it accordingly ---> ! <cfif alterSpec[i].colType IS "LONGTEXT"> ! <option value="LONGTEXT" selected class="Fancy">LONGTEXT</option> ! <cfelse> ! <option value="LONGTEXT" class="Fancy">LONGTEXT</option> ! </cfif> ! ! <!--- Check to see if ENUM option was selected, and reselect it accordingly ---> ! <cfif alterSpec[i].colType IS "ENUM"> ! <option value="ENUM" selected class="Fancy">ENUM(v1,v2,...)</option> ! <cfelse> ! <option value="ENUM" class="Fancy">ENUM(v1,v2,...)</option> ! </cfif> ! ! <!--- Check to see if SET option was selected, and reselect it accordingly ---> ! <cfif alterSpec[i].colType IS "SET"> ! <option value="SET" selected class="Fancy">SET(v1,v2,...)</option> ! <cfelse> ! <option value="SET" class="Fancy">SET(v1,v2,...)</option> ! </cfif> ! </optgroup> ! <optgroup label="Numeric" class="Fancy"> ! <!--- Check to see if TINYINT option was selected, and reselect it accordingly ---> ! <cfif alterSpec[i].colType IS "TINYINT"> ! <option value="TINYINT" selected class="Fancy">TINYINT(m)</option> ! <cfelse> ! <option value="TINYINT" class="Fancy">TINYINT(m)</option> ! </cfif> ! ! <!--- Check to see if SMALLINT option was selected, and reselect it accordingly ---> ! <cfif alterSpec[i].colType IS "SMALLINT"> ! <option value="SMALLINT" selected class="Fancy">SMALLINT(m)</option> ! <cfelse> ! <option value="SMALLINT" class="Fancy">SMALLINT(m)</option> ! </cfif> ! ! <!--- Check to see if MEDIUMINT option was selected, and reselect it accordingly ---> ! <cfif alterSpec[i].colType IS "MEDIUMINT"> ! <option value="MEDIUMINT" selected class="Fancy">MEDIUMINT(m)</option> ! <cfelse> ! <option value="MEDIUMINT" class="Fancy">MEDIUMINT(m)</option> ! </cfif> ! ! <!--- Check to see if INT option was selected, and reselect it accordingly ---> ! <cfif alterSpec[i].colType IS "INT"> ! <option value="INT" selected class="Fancy">INT(m)</option> ! <cfelse> ! <option value="INT" class="Fancy">INT(m)</option> ! </cfif> ! ! <!--- Check to see if BIGINT option was selected, and reselect it accordingly ---> ! <cfif alterSpec[i].colType IS "BIGINT"> ! <option value="BIGINT" selected class="Fancy">BIGINT(m)</option> ! <cfelse> ! <option value="BIGINT" class="Fancy">BIGINT(m)</option> ! </cfif> ! ! <!--- Check to see if FLOAT option was selected, and reselect it accordingly ---> ! <cfif alterSpec[i].colType IS "FLOAT"> ! <option value="FLOAT" selected class="Fancy">FLOAT(m,d)</option> ! <cfelse> ! <option value="FLOAT" class="Fancy">FLOAT(m,d)</option> ! </cfif> ! ! <!--- Check to see if DOUBLE option was selected, and reselect it accordingly ---> ! <cfif alterSpec[i].colType IS "DOUBLE"> ! <option value="DOUBLE" selected class="Fancy">DOUBLE(m,d)</option> ! <cfelse> ! <option value="DOUBLE" class="Fancy">DOUBLE(m,d)</option> ! </cfif> ! ! <!--- Check to see if DECIMAL option was selected, and reselect it accordingly ---> ! <cfif alterSpec[i].colType IS "DECIMAL"> ! <option value="DECIMAL" selected class="Fancy">DECIMAL(m,d)</option> ! <cfelse> ! <option value="DECIMAL" class="Fancy">DECIMAL(m,d)</option> ! </cfif> ! </optgroup> ! <optgroup label="Date Time" class="Fancy"> ! <!--- Check to see if DATE option was selected, and reselect it accordingly ---> ! <cfif alterSpec[i].colType IS "DATE"> ! <option value="DATE" selected class="Fancy">DATE</option> ! <cfelse> ! <option value="DATE" class="Fancy">DATE</option> ! </cfif> ! ! <!--- Check to see if TIME option was selected, and reselect it accordingly ---> ! <cfif alterSpec[i].colType IS "TIME"> ! <option value="TIME" selected class="Fancy">TIME</option> ! <cfelse> ! <option value="TIME" class="Fancy">TIME</option> ! </cfif> ! ! <!--- Check to see if DATETIME option was selected, and reselect it accordingly ---> ! <cfif alterSpec[i].colType IS "DATETIME"> ! <option value="DATETIME" selected class="Fancy">DATETIME</option> ! <cfelse> ! <option value="DATETIME" class="Fancy">DATETIME</option> ! </cfif> ! ! <!--- Check to see if YEAR option was selected, and reselect it accordingly ---> ! <cfif alterSpec[i].colType IS "YEAR"> ! <option value="YEAR" selected class="Fancy">YEAR</option> ! <cfelse> ! <option value="YEAR" class="Fancy">YEAR</option> ! </cfif> ! ! <!--- Check to see if TIMESTAMP option was selected, and reselect it accordingly ---> ! <cfif alterSpec[i].colType IS "TIMESTAMP"> ! <option value="TIMESTAMP" selected class="Fancy">TIMESTAMP(m)</option> ! <cfelse> ! <option value="TIMESTAMP" class="Fancy">TIMESTAMP(m)</option> ! </cfif> ! </optgroup> ! </cfselect> </td> --- 67,288 ---- <td><label class="Fancy">#i#</label></td> ! <!---||| Allow User to Specify the Fields Name, Type and Default Value |||---> <!--- If the form has been resubmitted by an onChange event than the original values for this form will be used ---> <td> ! <table width="100%" border="0" cellpadding="0" cellspacing="0"> ! <!--- Field Name ---> ! <!---***Add validate="regular_expression" to below, to ensure user entered a valid field name***---> ! <tr> ! <td><label for="fieldName#i#" class="Fancy">Field Name:</label></td> ! <td><cfinput name="fieldName#i#" type="text" value="#alterSpec[i].colName#" size="20" maxlength="64" required="yes" message="You must enter a valid field name for New Field number #i#." class="Fancy" /></td> ! </tr> ! ! <!--- Field Type ---> ! <tr> ! <td><label for="fieldType#i#" class="Fancy">Field Type:</label></td> ! <td> ! <cfselect name="fieldType#i#" size="1" required="yes" class="Fancy" onChange="this.form.submit()"> ! <!--- Check to see if empty option was selected, and reselect it accordingly ---> ! <cfif alterSpec[i].colType IS ""> ! <option value="Empty" selected class="Fancy"></option> ! <cfelse> ! <option value="Empty" class="Fancy"></option> ! </cfif> ! <optgroup label="String" class="Fancy"> ! <!--- Check to see if VARCHAR option was selected, and reselect it accordingly ---> ! <cfif alterSpec[i].colType IS "VARCHAR"> ! <option value="VARCHAR" selected class="Fancy">VARCHAR(m)</option> ! <cfelse> ! <option value="VARCHAR" class="Fancy">VARCHAR(m)</option> ! </cfif> ! ! <!--- Check to see if CHAR option was selected, and reselect it accordingly ---> ! <cfif alterSpec[i].colType IS "CHAR"> ! <option value="CHAR" selected class="Fancy">CHAR(m)</option> ! <cfelse> ! <option value="CHAR" class="Fancy">CHAR(m)</option> ! </cfif> ! ! <!--- Check to see if TINYBLOB option was selected, and reselect it accordingly ---> ! <cfif alterSpec[i].colType IS "TINYBLOB"> ! <option value="TINYBLOB" selected class="Fancy">TINYBLOB</option> ! <cfelse> ! <option value="TINYBLOB" class="Fancy">TINYBLOB</option> ! </cfif> ! ! <!--- Check to see if BLOB option was selected, and reselect it accordingly ---> ! <cfif alterSpec[i].colType IS "BLOB"> ! <option value="BLOB" selected class="Fancy">BLOB</option> ! <cfelse> ! <option value="BLOB" class="Fancy">BLOB</option> ! </cfif> ! ! <!--- Check to see if MEDIUMBLOB option was selected, and reselect it accordingly ---> ! <cfif alterSpec[i].colType IS "MEDIUMBLOB"> ! <option value="MEDIUMBLOB" selected class="Fancy">MEDIUMBLOB</option> ! <cfelse> ! <option value="MEDIUMBLOB" class="Fancy">MEDIUMBLOB</option> ! </cfif> ! ! <!--- Check to see if LONGBLOB option was selected, and reselect it accordingly ---> ! <cfif alterSpec[i].colType IS "LONGBLOB"> ! <option value="LONGBLOB" selected class="Fancy">LONGBLOB</option> ! <cfelse> ! <option value="LONGBLOB" class="Fancy">LONGBLOB</option> ! </cfif> ! ! <!--- Check to see if TINYTEXT option was selected, and reselect it accordingly ---> ! <cfif alterSpec[i].colType IS "TINYTEXT"> ! <option value="TINYTEXT" selected class="Fancy">TINYTEXT</option> ! <cfelse> ! <option value="TINYTEXT" class="Fancy">TINYTEXT</option> ! </cfif> ! ! <!--- Check to see if TEXT option was selected, and reselect it accordingly ---> ! <cfif alterSpec[i].colType IS "TEXT"> ! <option value="TEXT" selected class="Fancy">TEXT</option> ! <cfelse> ! <option value="TEXT" class="Fancy">TEXT</option> ! </cfif> ! ! <!--- Check to see if MEDIUMTEXT option was selected, and reselect it accordingly ---> ! <cfif alterSpec[i].colType IS "MEDIUMTEXT"> ! <option value="MEDIUMTEXT" selected class="Fancy">MEDIUMTEXT</option> ! <cfelse> ! <option value="MEDIUMTEXT" class="Fancy">MEDIUMTEXT</option> ! </cfif> ! ! <!--- Check to see if LONGTEXT option was selected, and reselect it accordingly ---> ! <cfif alterSpec[i].colType IS "LONGTEXT"> ! <option value="LONGTEXT" selected class="Fancy">LONGTEXT</option> ! <cfelse> ! <option value="LONGTEXT" class="Fancy">LONGTEXT</option> ! </cfif> ! ! <!--- Check to see if ENUM option was selected, and reselect it accordingly ---> ! <cfif alterSpec[i].colType IS "ENUM"> ! <option value="ENUM" selected class="Fancy">ENUM(v1,v2,...)</option> ! <cfelse> ! <option value="ENUM" class="Fancy">ENUM(v1,v2,...)</option> ! </cfif> ! ! <!--- Check to see if SET option was selected, and reselect it accordingly ---> ! <cfif alterSpec[i].colType IS "SET"> ! <option value="SET" selected class="Fancy">SET(v1,v2,...)</option> ! <cfelse> ! <option value="SET" class="Fancy">SET(v1,v2,...)</option> ! </cfif> ! </optgroup> ! <optgroup label="Numeric" class="Fancy"> ! <!--- Check to see if TINYINT option was selected, and reselect it accordingly ---> ! <cfif alterSpec[i].colType IS "TINYINT"> ! <option value="TINYINT" selected class="Fancy">TINYINT(m)</option> ! <cfelse> ! <option value="TINYINT" class="Fancy">TINYINT(m)</option> ! </cfif> ! ! <!--- Check to see if SMALLINT option was selected, and reselect it accordingly ---> ! <cfif alterSpec[i].colType IS "SMALLINT"> ! <option value="SMALLINT" selected class="Fancy">SMALLINT(m)</option> ! <cfelse> ! <option value="SMALLINT" class="Fancy">SMALLINT(m)</option> ! </cfif> ! ! <!--- Check to see if MEDIUMINT option was selected, and reselect it accordingly ---> ! <cfif alterSpec[i].colType IS "MEDIUMINT"> ! <option value="MEDIUMINT" selected class="Fancy">MEDIUMINT(m)</option> ! <cfelse> ! <option value="MEDIUMINT" class="Fancy">MEDIUMINT(m)</option> ! </cfif> ! ! <!--- Check to see if INT option was selected, and reselect it accordingly ---> ! <cfif alterSpec[i].colType IS "INT"> ! <option value="INT" selected class="Fancy">INT(m)</option> ! <cfelse> ! <option value="INT" class="Fancy">INT(m)</option> ! </cfif> ! ! <!--- Check to see if BIGINT option was selected, and reselect it accordingly ---> ! <cfif alterSpec[i].colType IS "BIGINT"> ! <option value="BIGINT" selected class="Fancy">BIGINT(m)</option> ! <cfelse> ! <option value="BIGINT" class="Fancy">BIGINT(m)</option> ! </cfif> ! ! <!--- Check to see if FLOAT option was selected, and reselect it accordingly ---> ! <cfif alterSpec[i].colType IS "FLOAT"> ! <option value="FLOAT" selected class="Fancy">FLOAT(m,d)</option> ! <cfelse> ! <option value="FLOAT" class="Fancy">FLOAT(m,d)</option> ! </cfif> ! ! <!--- Check to see if DOUBLE option was selected, and reselect it accordingly ---> ! <cfif alterSpec[i].colType IS "DOUBLE"> ! <option value="DOUBLE" selected class="Fancy">DOUBLE(m,d)</option> ! <cfelse> ! <option value="DOUBLE" class="Fancy">DOUBLE(m,d)</option> ! </cfif> ! ! <!--- Check to see if DECIMAL option was selected, and reselect it accordingly ---> ! <cfif alterSpec[i].colType IS "DECIMAL"> ! <option value="DECIMAL" selected class="Fancy">DECIMAL(m,d)</option> ! <cfelse> ! <option value="DECIMAL" class="Fancy">DECIMAL(m,d)</option> ! </cfif> ! </optgroup> ! <optgroup label="Date Time" class="Fancy"> ! <!--- Check to see if DATE option was selected, and reselect it accordingly ---> ! <cfif alterSpec[i].colType IS "DATE"> ! <option value="DATE" selected class="Fancy">DATE</option> ! <cfelse> ! <option value="DATE" class="Fancy">DATE</option> ! </cfif> ! ! <!--- Check to see if TIME option was selected, and reselect it accordingly ---> ! <cfif alterSpec[i].colType IS "TIME"> ! <option value="TIME" selected class="Fancy">TIME</option> ! <cfelse> ! <option value="TIME" class="Fancy">TIME</option> ! </cfif> ! ! <!--- Check to see if DATETIME option was selected, and reselect it accordingly ---> ! <cfif alterSpec[i].colType IS "DATETIME"> ! <option value="DATETIME" selected class="Fancy">DATETIME</option> ! <cfelse> ! <option value="DATETIME" class="Fancy">DATETIME</option> ! </cfif> ! ! <!--- Check to see if YEAR option was selected, and reselect it accordingly ---> ! <cfif alterSpec[i].colType IS "YEAR"> ! <option value="YEAR" selected class="Fancy">YEAR</option> ! <cfelse> ! <option value="YEAR" class="Fancy">YEAR</option> ! </cfif> ! ! <!--- Check to see if TIMESTAMP option was selected, and reselect it accordingly ---> ! <cfif alterSpec[i].colType IS "TIMESTAMP"> ! <option value="TIMESTAMP" selected class="Fancy">TIMESTAMP(m)</option> ! <cfelse> ! <option value="TIMESTAMP" class="Fancy">TIMESTAMP(m)</option> ! </cfif> ! </optgroup> ! </cfselect> ! </td> ! </tr> ! ! <!--- Default Value ---> ! <tr> ! <td><label for="defaultValue#i#" class="Fancy">Default Value:</label></td> ! <td> ! <!--- Allow User to Enter a Default Value for the Field Unless fieldType is BLOB or TEXT ---> ! <cfswitch expression="#alterSpec[i].colType#"> ! <cfcase value="TINYBLOB,BLOB,MEDIUMBLOB,LONGBLOB,TINYTEXT,TEXT,MEDIUMTEXT,LONGTEXT"> ! <label class="Fancy">BLOB and TEXT field types can not have default values.</label> ! </cfcase> ! <cfdefaultcase><cfinput name="defaultValue#i#" value="#alterSpec[i].defaultValue#" type="text" size="20" required="no" class="Fancy" /></cfdefaultcase> ! </cfswitch> ! </td> ! </tr> ! </table> </td> *************** *** 444,457 **** <!---||| Datatype not selected default display |||---> <cfdefaultcase><label class="Fancy">Select a Field Type to see Field Options</label></cfdefaultcase> - </cfswitch> - </td> - - <!---||| Allow User to Enter a Default Value for the Field Unless fieldType is BLOB or TEXT |||---> - <td> - <cfswitch expression="#alterSpec[i].colType#"> - <cfcase value="TINYBLOB,BLOB,MEDIUMBLOB,LONGBLOB,TINYTEXT,TEXT,MEDIUMTEXT,LONGTEXT"> - <label class="Fancy">BLOB and TEXT field types can not have default values.</label> - </cfcase> - <cfdefaultcase><cfinput name="defaultValue#i#" value="#alterSpec[i].defaultValue#" type="text" size="20" required="no" class="Fancy" /></cfdefaultcase> </cfswitch> </td> --- 468,471 ---- |
|
From: <nan...@us...> - 2003-06-30 19:59:03
|
Update of /cvsroot/mydatabasepilot/MyDatabasePilot/dbProcessInit
In directory sc8-pr-cvs1:/tmp/cvs-serv28667/dbProcessInit
Modified Files:
AddField.cfm
Log Message:
Internal Structure Changed:
[ 758157 ] Converted Some Code to <CFScript>
Index: AddField.cfm
===================================================================
RCS file: /cvsroot/mydatabasepilot/MyDatabasePilot/dbProcessInit/AddField.cfm,v
retrieving revision 1.21
retrieving revision 1.22
diff -C2 -d -r1.21 -r1.22
*** AddField.cfm 26 Jun 2003 19:15:47 -0000 1.21
--- AddField.cfm 30 Jun 2003 19:58:59 -0000 1.22
***************
*** 54,68 ****
alterSpec[i].defaultValue="#Trim(Evaluate("FORM.defaultValue#i#"))#"; // Create Key "defaultValue"
alterSpec[i].key="#Evaluate("FORM.key#i#")#"; // Create Key "key"
</cfscript>
- <!--- Create Key "binary" --->
- <cfif IsDefined("FORM.binary#i#")><cfset alterSpec[i].binary=TRUE /><cfelse><cfset alterSpec[i].binary=FALSE /></cfif>
- <!--- Create Key "unsigned" --->
- <cfif IsDefined("FORM.unsigned#i#")><cfset alterSpec[i].unsigned=TRUE /><cfelse><cfset alterSpec[i].unsigned=FALSE /></cfif>
- <!--- Create Key "zerofill" --->
- <cfif IsDefined("FORM.zerofill#i#")><cfset alterSpec[i].zerofill=TRUE /><cfelse><cfset alterSpec[i].zerofill=FALSE /></cfif>
- <!--- Create Key "notNull" --->
- <cfif IsDefined("FORM.notNull#i#")><cfset alterSpec[i].notNull=TRUE /><cfelse><cfset alterSpec[i].notNull=FALSE /></cfif>
- <!--- Create Key "autoIncrement" --->
- <cfif IsDefined("FORM.autoIncrement#i#")><cfset alterSpec[i].autoIncrement=TRUE /><cfelse><cfset alterSpec[i].autoIncrement=FALSE /></cfif>
</cfloop>
--- 54,88 ----
alterSpec[i].defaultValue="#Trim(Evaluate("FORM.defaultValue#i#"))#"; // Create Key "defaultValue"
alterSpec[i].key="#Evaluate("FORM.key#i#")#"; // Create Key "key"
+
+ // Create Key "binary"
+ if(IsDefined("FORM.binary#i#"))
+ alterSpec[i].binary=TRUE;
+ else
+ alterSpec[i].binary=FALSE;
+
+ // Create Key "unsigned"
+ if(IsDefined("FORM.unsigned#i#"))
+ alterSpec[i].unsigned=TRUE;
+ else
+ alterSpec[i].unsigned=FALSE;
+
+ // Create Key "zerofill"
+ if(IsDefined("FORM.zerofill#i#"))
+ alterSpec[i].zerofill=TRUE;
+ else
+ alterSpec[i].zerofill=FALSE;
+
+ // Create Key "notNull"
+ if(IsDefined("FORM.notNull#i#"))
+ alterSpec[i].notNull=TRUE;
+ else
+ alterSpec[i].notNull=FALSE;
+
+ // Create Key "autoIncrement"
+ if(IsDefined("FORM.autoIncrement#i#"))
+ alterSpec[i].autoIncrement=TRUE;
+ else
+ alterSpec[i].autoIncrement=FALSE;
</cfscript>
</cfloop>
|
|
From: <nan...@us...> - 2003-06-27 14:14:23
|
Update of /cvsroot/mydatabasepilot/MyDatabasePilot/Query
In directory sc8-pr-cvs1:/tmp/cvs-serv22607/Query
Modified Files:
alterTable.cfm
Log Message:
Internal Structure Changed:
[ 758157 ] Converted Some Code to <CFScript>
Index: alterTable.cfm
===================================================================
RCS file: /cvsroot/mydatabasepilot/MyDatabasePilot/Query/alterTable.cfm,v
retrieving revision 1.23
retrieving revision 1.24
diff -C2 -d -r1.23 -r1.24
*** alterTable.cfm 26 Jun 2003 19:15:47 -0000 1.23
--- alterTable.cfm 27 Jun 2003 14:14:17 -0000 1.24
***************
*** 56,87 ****
<!--- "ADD COLUMN" Alter Specification --->
<cfcase value="ADD COLUMN">
! <!--- ADD COLUMN KeyWord --->
! <cfset rawSQL = "#rawSQL# ADD COLUMN" />
! <cfset htmlSQL = "#htmlSQL#<br /><span class=""KeyWord"">ADD COLUMN</span>" />
! <!--- Column Name --->
! <cfif ATTRIBUTES.alterSpec[i].colName IS "">
! <cfset rawSQL = "#rawSQL# NameNotSpecified_#i#" />
! <cfset htmlSQL = "#htmlSQL# <span class=""Missing"">NameNotSpecified_#i#</span>" />
! <cfelse>
! <cfset rawSQL = "#rawSQL# #ATTRIBUTES.alterSpec[i].colName#" />
! <cfset htmlSQL = "#htmlSQL# <span class=""String"">#ATTRIBUTES.alterSpec[i].colName#</span>" />
! </cfif>
! <!--- Column Type --->
! <cfif ATTRIBUTES.alterSpec[i].colType IS "" OR ATTRIBUTES.alterSpec[i].colType IS "Empty">
! <cfset rawSQL = "#rawSQL# DataTypeNotSpecified_#i#" />
! <cfset htmlSQL = "#htmlSQL# <span class=""Missing"">DataTypeNotSpecified_#i#</span>" />
! <cfelse>
! <!--- Initialize Integer, Numeric, and isTextOrBlobCol Type to FALSE --->
! <cfset isIntegerCol = FALSE />
! <cfset isNumericCol = FALSE />
! <cfset isTextOrBlobCol = FALSE />
! <cfset isTemporalCol = FALSE />
! <!--- Add Column Type to Output Strings --->
! <cfset rawSQL = "#rawSQL# #ATTRIBUTES.alterSpec[i].colType#" />
! <cfset htmlSQL = "#htmlSQL# <span class=""KeyWord"">#ATTRIBUTES.alterSpec[i].colType#</span>" />
! <!--- Type Options --->
! <cfscript>
switch(ATTRIBUTES.alterSpec[i].colType){
case "VARCHAR": case "CHAR":{
--- 56,91 ----
<!--- "ADD COLUMN" Alter Specification --->
<cfcase value="ADD COLUMN">
! <cfscript>
! // ADD COLUMN KeyWord
! rawSQL = "#rawSQL# ADD COLUMN";
! htmlSQL = "#htmlSQL#<br /><span class=""KeyWord"">ADD COLUMN</span>";
! // Column Name
! if(ATTRIBUTES.alterSpec[i].colName IS ""){
! rawSQL = "#rawSQL# NameNotSpecified_#i#";
! htmlSQL = "#htmlSQL# <span class=""Missing"">NameNotSpecified_#i#</span>";
! }else{
! rawSQL = "#rawSQL# #ATTRIBUTES.alterSpec[i].colName#";
! htmlSQL = "#htmlSQL# <span class=""String"">#ATTRIBUTES.alterSpec[i].colName#</span>";
! }
! // Column Type
! if(ATTRIBUTES.alterSpec[i].colType IS "" OR ATTRIBUTES.alterSpec[i].colType IS "Empty"){
! rawSQL = "#rawSQL# DataTypeNotSpecified_#i#";
! htmlSQL = "#htmlSQL# <span class=""Missing"">DataTypeNotSpecified_#i#</span>";
! }else{
! // Initialize Integer, Numeric, isTextOrBlobCol, and Temporal Type to FALSE
! isIntegerCol = FALSE;
! isNumericCol = FALSE;
! isTextOrBlobCol = FALSE;
! isTemporalCol = FALSE;
!
! // Add Column Type to Output Strings
! rawSQL = "#rawSQL# #ATTRIBUTES.alterSpec[i].colType#";
! htmlSQL = "#htmlSQL# <span class=""KeyWord"">#ATTRIBUTES.alterSpec[i].colType#</span>";
!
! //-----------------
! // Add Type Options
! //-----------------
switch(ATTRIBUTES.alterSpec[i].colType){
case "VARCHAR": case "CHAR":{
***************
*** 167,173 ****
}
}
! </cfscript>
!
! <cfscript>
// Add Unsigned to Output Strings if Specified and is Numeric Column
if(ATTRIBUTES.alterSpec[i].unsigned AND isNumericCol){
--- 171,175 ----
}
}
!
// Add Unsigned to Output Strings if Specified and is Numeric Column
if(ATTRIBUTES.alterSpec[i].unsigned AND isNumericCol){
***************
*** 206,213 ****
// ToDo: [reference_definition]
! //-----------------------------------------------------
! // Location of new Field : [FIRST | AFTER column_name ]
! //-----------------------------------------------------
!
// If location is set to "Beginning" ...
if(ATTRIBUTES.alterSpec[i].colLocation IS "Beginning"){
--- 208,214 ----
// ToDo: [reference_definition]
! /*----------------------------------------------------
! Location of new Field : [FIRST | AFTER column_name ]
! ----------------------------------------------------*/
// If location is set to "Beginning" ...
if(ATTRIBUTES.alterSpec[i].colLocation IS "Beginning"){
***************
*** 259,264 ****
}
}
! </cfscript>
! </cfif>
</cfcase>
<!--- ToDo Cases: --->
--- 260,265 ----
}
}
! }
! </cfscript>
</cfcase>
<!--- ToDo Cases: --->
|
|
From: <nan...@us...> - 2003-06-26 19:15:50
|
Update of /cvsroot/mydatabasepilot/MyDatabasePilot/dbProcessInit
In directory sc8-pr-cvs1:/tmp/cvs-serv4992/dbProcessInit
Modified Files:
AddField.cfm
Log Message:
Internal Structure Changed:
[ 761376 ] Converted alterSpec[i].legalValues to an Array
Index: AddField.cfm
===================================================================
RCS file: /cvsroot/mydatabasepilot/MyDatabasePilot/dbProcessInit/AddField.cfm,v
retrieving revision 1.20
retrieving revision 1.21
diff -C2 -d -r1.20 -r1.21
*** AddField.cfm 26 Jun 2003 14:02:50 -0000 1.20
--- AddField.cfm 26 Jun 2003 19:15:47 -0000 1.21
***************
*** 47,51 ****
alterSpec[i].colType="#Trim(Evaluate("FORM.fieldType#i#"))#"; // Create Key "colType"
alterSpec[i].length="#Trim(Evaluate("FORM.length#i#"))#"; // Create Key "length"
! alterSpec[i].legalValues="#Trim(Evaluate("FORM.legalValues#i#"))#"; // Create Key "valueList"
alterSpec[i].numberOfDecimals="#Trim(Evaluate("FORM.numberOfDecimals#i#"))#"; // Create Key "numberOfDecimals"
alterSpec[i].defaultValue="#Trim(Evaluate("FORM.defaultValue#i#"))#"; // Create Key "defaultValue"
--- 47,54 ----
alterSpec[i].colType="#Trim(Evaluate("FORM.fieldType#i#"))#"; // Create Key "colType"
alterSpec[i].length="#Trim(Evaluate("FORM.length#i#"))#"; // Create Key "length"
!
! alterSpec[i].legalValues=ArrayNew(1); // Create Key "legalValues" as an array
! alterSpec[i].legalValues=ListToArray(Trim(Evaluate("FORM.legalValues#i#")), #CRLF#);
!
alterSpec[i].numberOfDecimals="#Trim(Evaluate("FORM.numberOfDecimals#i#"))#"; // Create Key "numberOfDecimals"
alterSpec[i].defaultValue="#Trim(Evaluate("FORM.defaultValue#i#"))#"; // Create Key "defaultValue"
|
|
From: <nan...@us...> - 2003-06-26 19:15:50
|
Update of /cvsroot/mydatabasepilot/MyDatabasePilot/dbProcessBody In directory sc8-pr-cvs1:/tmp/cvs-serv4992/dbProcessBody Modified Files: AddField.cfm Log Message: Internal Structure Changed: [ 761376 ] Converted alterSpec[i].legalValues to an Array Index: AddField.cfm =================================================================== RCS file: /cvsroot/mydatabasepilot/MyDatabasePilot/dbProcessBody/AddField.cfm,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** AddField.cfm 19 Jun 2003 15:00:35 -0000 1.12 --- AddField.cfm 26 Jun 2003 19:15:47 -0000 1.13 *************** *** 309,313 **** <!--- Show "Value List" Option, set value to previous request if it exists ---> <label for="legalValues#i#" class="Fancy">Value List:<br />Enter Each Value on a New Line</label><br /> ! <textarea name="legalValues#i#" cols="20" rows="5" class="Fancy">#alterSpec[i].legalValues#</textarea> <br /> --- 309,313 ---- <!--- Show "Value List" Option, set value to previous request if it exists ---> <label for="legalValues#i#" class="Fancy">Value List:<br />Enter Each Value on a New Line</label><br /> ! <textarea name="legalValues#i#" cols="20" rows="5" class="Fancy">#ArrayToList(alterSpec[i].legalValues, "#CRLF#")#</textarea> <br /> *************** *** 466,470 **** </cfif> ! <!--- Unique Key ---> <cfif #alterSpec[i].key# IS "Unique"> <cfinput name="key#i#" type="radio" value="Unique" checked="yes" /><label class="Fancy">Unique</label><br /> --- 466,470 ---- </cfif> ! <!--- Unique Index ---> <cfif #alterSpec[i].key# IS "Unique"> <cfinput name="key#i#" type="radio" value="Unique" checked="yes" /><label class="Fancy">Unique</label><br /> |
|
From: <nan...@us...> - 2003-06-26 19:15:50
|
Update of /cvsroot/mydatabasepilot/MyDatabasePilot/Query
In directory sc8-pr-cvs1:/tmp/cvs-serv4992/Query
Modified Files:
alterTable.cfm
Log Message:
Internal Structure Changed:
[ 761376 ] Converted alterSpec[i].legalValues to an Array
Index: alterTable.cfm
===================================================================
RCS file: /cvsroot/mydatabasepilot/MyDatabasePilot/Query/alterTable.cfm,v
retrieving revision 1.22
retrieving revision 1.23
diff -C2 -d -r1.22 -r1.23
*** alterTable.cfm 24 Jun 2003 21:38:11 -0000 1.22
--- alterTable.cfm 26 Jun 2003 19:15:47 -0000 1.23
***************
*** 38,43 ****
<cfset rawSQL = "ALTER TABLE" />
<cfset htmlSQL = "<span class=""KeyWord"">ALTER TABLE</span>" />
- <!--- New Line Break: Carriage Return and Linefeed Characters used as delimiters --->
- <cfset CRLF="#Chr(13)##Chr(10)#" />
<!---||| Table Name |||--->
--- 38,41 ----
***************
*** 105,116 ****
case "ENUM": case "SET":{
// Add Legal Values to Output Strings
! if(ATTRIBUTES.alterSpec[i].legalValues IS ""){
rawSQL = "#rawSQL#(ValuesNotSpecified_#i#)";
htmlSQL = "#htmlSQL#(<span class=""Missing"">ValuesNotSpecified_#i#</span>)";
}else{
! // Replace the Carriage Return and Linefeed Characters with a single quote, comma, and a single quote
! // Also add begining and trailing single quotes so the value list is in the correct format: 'value1','value2',...
! rawSQL = "#rawSQL#('#Replace(ATTRIBUTES.alterSpec[i].legalValues, "#CRLF#", "','", "ALL")#')";
! htmlSQL = "#htmlSQL#('<span class=""String"">#Replace(ATTRIBUTES.alterSpec[i].legalValues, "#CRLF#", "</span>','<span class=""String"">", "ALL")#</span>')";
}
break;
--- 103,114 ----
case "ENUM": case "SET":{
// Add Legal Values to Output Strings
! if(ArrayIsEmpty(ATTRIBUTES.alterSpec[i].legalValues)){
rawSQL = "#rawSQL#(ValuesNotSpecified_#i#)";
htmlSQL = "#htmlSQL#(<span class=""Missing"">ValuesNotSpecified_#i#</span>)";
}else{
! tempRawList = ArrayToList(ATTRIBUTES.alterSpec[i].legalValues, "','");
! tempHtmlList = ArrayToList(ATTRIBUTES.alterSpec[i].legalValues, "</span>','<span class=""String"">");
! rawSQL = "#rawSQL#('#tempRawList#')";
! htmlSQL = "#htmlSQL#('<span class=""String"">#tempHtmlList#</span>')";
}
break;
|
|
From: <nan...@us...> - 2003-06-26 14:02:54
|
Update of /cvsroot/mydatabasepilot/MyDatabasePilot/dbProcessInit
In directory sc8-pr-cvs1:/tmp/cvs-serv16883/dbProcessInit
Modified Files:
AddField.cfm
Log Message:
Internal Structure Changed:
[ 758157 ] Converted Some Code to <CFScript>
Index: AddField.cfm
===================================================================
RCS file: /cvsroot/mydatabasepilot/MyDatabasePilot/dbProcessInit/AddField.cfm,v
retrieving revision 1.19
retrieving revision 1.20
diff -C2 -d -r1.19 -r1.20
*** AddField.cfm 20 Jun 2003 20:21:24 -0000 1.19
--- AddField.cfm 26 Jun 2003 14:02:50 -0000 1.20
***************
*** 39,63 ****
<cfparam name="FORM.key#i#" default="None" />
! <!---||| Create Structre and Keys |||--->
! <!--- Create a Structure for each new field --->
! <cfset alterSpec[i]=StructNew() />
! <!--- Create Key "format" --->
! <cfset alterSpec[i].format="ADD COLUMN" />
! <!--- Create Key "colLocation" --->
! <cfset alterSpec[i].colLocation="#FORM.locationOfFields#" />
! <!--- Create Key "colName" --->
! <cfset alterSpec[i].colName="#Trim(Evaluate("FORM.fieldName#i#"))#" />
! <!--- Create Key "colType" --->
! <cfset alterSpec[i].colType="#Trim(Evaluate("FORM.fieldType#i#"))#" />
! <!--- Create Key "length" --->
! <cfset alterSpec[i].length="#Trim(Evaluate("FORM.length#i#"))#" />
! <!--- Create Key "valueList" --->
! <cfset alterSpec[i].legalValues="#Trim(Evaluate("FORM.legalValues#i#"))#" />
! <!--- Create Key "numberOfDecimals" --->
! <cfset alterSpec[i].numberOfDecimals="#Trim(Evaluate("FORM.numberOfDecimals#i#"))#" />
! <!--- Create Key "defaultValue" --->
! <cfset alterSpec[i].defaultValue="#Trim(Evaluate("FORM.defaultValue#i#"))#" />
! <!--- Create Key "key" --->
! <cfset alterSpec[i].key="#Evaluate("FORM.key#i#")#" />
<!--- Create Key "binary" --->
<cfif IsDefined("FORM.binary#i#")><cfset alterSpec[i].binary=TRUE /><cfelse><cfset alterSpec[i].binary=FALSE /></cfif>
--- 39,55 ----
<cfparam name="FORM.key#i#" default="None" />
! <cfscript>
! // Create a Structure for each new column, and Add keys for each property
! alterSpec[i]=StructNew();
! alterSpec[i].format="ADD COLUMN"; // Create Key "format"
! alterSpec[i].colLocation="#FORM.locationOfFields#"; // Create Key "colLocation"
! alterSpec[i].colName="#Trim(Evaluate("FORM.fieldName#i#"))#"; // Create Key "colName"
! alterSpec[i].colType="#Trim(Evaluate("FORM.fieldType#i#"))#"; // Create Key "colType"
! alterSpec[i].length="#Trim(Evaluate("FORM.length#i#"))#"; // Create Key "length"
! alterSpec[i].legalValues="#Trim(Evaluate("FORM.legalValues#i#"))#"; // Create Key "valueList"
! alterSpec[i].numberOfDecimals="#Trim(Evaluate("FORM.numberOfDecimals#i#"))#"; // Create Key "numberOfDecimals"
! alterSpec[i].defaultValue="#Trim(Evaluate("FORM.defaultValue#i#"))#"; // Create Key "defaultValue"
! alterSpec[i].key="#Evaluate("FORM.key#i#")#"; // Create Key "key"
! </cfscript>
<!--- Create Key "binary" --->
<cfif IsDefined("FORM.binary#i#")><cfset alterSpec[i].binary=TRUE /><cfelse><cfset alterSpec[i].binary=FALSE /></cfif>
|
|
From: <nan...@us...> - 2003-06-24 21:38:14
|
Update of /cvsroot/mydatabasepilot/MyDatabasePilot/Query
In directory sc8-pr-cvs1:/tmp/cvs-serv15965/Query
Modified Files:
alterTable.cfm
Log Message:
Internal Structure Changed:
[ 758157 ] Converted Some Code to <CFScript>
Index: alterTable.cfm
===================================================================
RCS file: /cvsroot/mydatabasepilot/MyDatabasePilot/Query/alterTable.cfm,v
retrieving revision 1.21
retrieving revision 1.22
diff -C2 -d -r1.21 -r1.22
*** alterTable.cfm 20 Jun 2003 21:14:08 -0000 1.21
--- alterTable.cfm 24 Jun 2003 21:38:11 -0000 1.22
***************
*** 85,197 ****
<cfset htmlSQL = "#htmlSQL# <span class=""KeyWord"">#ATTRIBUTES.alterSpec[i].colType#</span>" />
<!--- Type Options --->
- <cfswitch expression="#ATTRIBUTES.alterSpec[i].colType#">
- <cfcase value="VARCHAR,CHAR">
- <!--- Add Length to Output Strings --->
- <cfif ATTRIBUTES.alterSpec[i].length IS "">
- <cfset rawSQL = "#rawSQL#(LengthNotSpecified_#i#)" />
- <cfset htmlSQL = "#htmlSQL#(<span class=""Missing"">LengthNotSpecified_#i#</span>)" />
- <cfelse>
- <cfset rawSQL = "#rawSQL#(#ATTRIBUTES.alterSpec[i].length#)" />
- <cfset htmlSQL = "#htmlSQL#(<span class=""Number"">#ATTRIBUTES.alterSpec[i].length#</span>)" />
- </cfif>
- <!--- Add Binary to Output Strings if Specified --->
- <cfif ATTRIBUTES.alterSpec[i].binary>
- <cfset rawSQL = "#rawSQL# BINARY" />
- <cfset htmlSQL = "#htmlSQL# <span class=""KeyWord"">BINARY</span>" />
- </cfif>
- </cfcase>
- <cfcase value="ENUM,SET">
- <!--- Add Legal Values to Output Strings --->
- <cfif ATTRIBUTES.alterSpec[i].legalValues IS "">
- <cfset rawSQL = "#rawSQL#(ValuesNotSpecified_#i#)" />
- <cfset htmlSQL = "#htmlSQL#(<span class=""Missing"">ValuesNotSpecified_#i#</span>)" />
- <cfelse>
- <!--- Replace the Carriage Return and Linefeed Characters with a single quote, comma, and a single quote--->
- <!--- Also add begining and trailing single quotes so the value list is in the correct format: 'value1','value2',... --->
- <cfset rawSQL = "#rawSQL#('#Replace(ATTRIBUTES.alterSpec[i].legalValues, "#CRLF#", "','", "ALL")#')" />
- <cfset htmlSQL = "#htmlSQL#('<span class=""String"">#Replace(ATTRIBUTES.alterSpec[i].legalValues, "#CRLF#", "</span>','<span class=""String"">", "ALL")#</span>')" />
- </cfif>
- </cfcase>
- <cfcase value="TINYINT,SMALLINT,MEDIUMINT,INT,INTEGER,BIGINT">
- <!--- Set Integer and Numeric Type to TRUE --->
- <cfset isIntegerCol = TRUE />
- <cfset isNumericCol = TRUE />
- <!--- Add Length to Output Strings if Specified --->
- <cfif ATTRIBUTES.alterSpec[i].length IS NOT "">
- <cfset rawSQL = "#rawSQL#(#ATTRIBUTES.alterSpec[i].length#)" />
- <cfset htmlSQL = "#htmlSQL#(<span class=""Number"">#ATTRIBUTES.alterSpec[i].length#</span>)" />
- </cfif>
- </cfcase>
- <cfcase value="REAL,FLOAT,DOUBLE">
- <!--- Set Numeric Type to TRUE --->
- <cfset isNumericCol = TRUE />
- <!--- Add Length and Decimals to Output Strings if Specified --->
- <cfif ATTRIBUTES.alterSpec[i].length IS NOT "">
- <cfset rawSQL = "#rawSQL#(#ATTRIBUTES.alterSpec[i].length#,#ATTRIBUTES.alterSpec[i].numberOfDecimals#)" />
- <cfset htmlSQL = "#htmlSQL#(<span class=""Number"">#ATTRIBUTES.alterSpec[i].length#</span>,<span class=""Number"">#ATTRIBUTES.alterSpec[i].numberOfDecimals#</span>)" />
- </cfif>
- </cfcase>
- <cfcase value="DECIMAL,NUMERIC">
- <!--- Set Numeric Type to TRUE --->
- <cfset isNumericCol = TRUE />
- <!--- Add Length to Output Strings --->
- <cfif ATTRIBUTES.alterSpec[i].length IS "" AND ATTRIBUTES.alterSpec[i].numberOfDecimals IS "">
- <cfset rawSQL = "#rawSQL#(LengthNotSpecified_#i#,DecimalsNotSpecified_#i#)" />
- <cfset htmlSQL = "#htmlSQL#(<span class=""Missing"">LengthNotSpecified_#i#</span>,<span class=""Missing"">DecimalsNotSpecified_#i#</span>)" />
- <cfelseif ATTRIBUTES.alterSpec[i].length IS "">
- <cfset rawSQL = "#rawSQL#(LengthNotSpecified_#i#,#ATTRIBUTES.alterSpec[i].numberOfDecimals#)" />
- <cfset htmlSQL = "#htmlSQL#(<span class=""Missing"">LengthNotSpecified_#i#</span>,<span class=""Number"">#ATTRIBUTES.alterSpec[i].numberOfDecimals#</span>)" />
- <cfelseif ATTRIBUTES.alterSpec[i].numberOfDecimals IS "">
- <cfset rawSQL = "#rawSQL#(#ATTRIBUTES.alterSpec[i].length#,DecimalsNotSpecified_#i#)" />
- <cfset htmlSQL = "#htmlSQL#(<span class=""Number"">#ATTRIBUTES.alterSpec[i].length#</span>,<span class=""Missing"">DecimalsNotSpecified_#i#</span>)" />
- <cfelse>
- <cfset rawSQL = "#rawSQL#(#ATTRIBUTES.alterSpec[i].length#,#ATTRIBUTES.alterSpec[i].numberOfDecimals#)" />
- <cfset htmlSQL = "#htmlSQL#(<span class=""Number"">#ATTRIBUTES.alterSpec[i].length#</span>,<span class=""Number"">#ATTRIBUTES.alterSpec[i].numberOfDecimals#</span>)" />
- </cfif>
- </cfcase>
- <cfcase value="TINYBLOB,BLOB,MEDIUMBLOB,LONGBLOB,TINYTEXT,TEXT,MEDIUMTEXT,LONGTEXT">
- <!--- Set Text or Blob Type to TRUE --->
- <cfset isTextOrBlobCol = TRUE />
- </cfcase>
- <cfcase value="DATE,TIME,DATETIME,YEAR,TIMESTAMP">
- <!--- Set Temporal Type to TRUE --->
- <cfset isTemporalCol = TRUE />
- </cfcase>
- </cfswitch>
- <!--- Add Unsigned to Output Strings if Specified and is Numeric Column --->
- <cfif ATTRIBUTES.alterSpec[i].unsigned AND isNumericCol>
- <cfset rawSQL = "#rawSQL# UNSIGNED" />
- <cfset htmlSQL = "#htmlSQL# <span class=""KeyWord"">UNSIGNED</span>" />
- </cfif>
- <!--- Add Zerofill to Output Strings if Specified and is Numeric Column --->
- <cfif ATTRIBUTES.alterSpec[i].zerofill AND isNumericCol>
- <cfset rawSQL = "#rawSQL# ZEROFILL" />
- <cfset htmlSQL = "#htmlSQL# <span class=""KeyWord"">ZEROFILL</span>" />
- </cfif>
- <!--- Add NULL | NOT NULL to Output Strings --->
- <cfif ATTRIBUTES.alterSpec[i].notNull>
- <cfset rawSQL = "#rawSQL# NOT NULL" />
- <cfset htmlSQL = "#htmlSQL# <span class=""KeyWord"">NOT NULL</span>" />
- <cfelse>
- <cfset rawSQL = "#rawSQL# NULL" />
- <cfset htmlSQL = "#htmlSQL# <span class=""KeyWord"">NULL</span>" />
- </cfif>
- <!--- Add DEFAULT to Output Strings if Specified --->
- <cfif ATTRIBUTES.alterSpec[i].defaultValue IS NOT "" AND NOT isTextOrBlobCol>
- <cfset rawSQL = "#rawSQL# DEFAULT #ATTRIBUTES.alterSpec[i].defaultValue#" />
- <cfset htmlSQL = "#htmlSQL# <span class=""KeyWord"">DEFAULT</span> <span class=""String"">#ATTRIBUTES.alterSpec[i].defaultValue#</span>" />
- </cfif>
- <!--- Add AUTO_INCREMENT to Output Strings if Specified and is Integer Column --->
- <cfif ATTRIBUTES.alterSpec[i].autoIncrement AND isIntegerCol>
- <cfset rawSQL = "#rawSQL# AUTO_INCREMENT" />
- <cfset htmlSQL = "#htmlSQL# <span class=""KeyWord"">AUTO_INCREMENT</span>" />
- </cfif>
- <!--- Add Single Column PRIMARY KEY to Output Strings if Specified --->
- <cfif ATTRIBUTES.alterSpec[i].key IS "Primary">
- <cfset rawSQL = "#rawSQL# PRIMARY KEY" />
- <cfset htmlSQL = "#htmlSQL# <span class=""KeyWord"">PRIMARY KEY</span>" />
- </cfif>
-
<cfscript>
// ToDo: [reference_definition]
--- 85,209 ----
<cfset htmlSQL = "#htmlSQL# <span class=""KeyWord"">#ATTRIBUTES.alterSpec[i].colType#</span>" />
<!--- Type Options --->
<cfscript>
+ switch(ATTRIBUTES.alterSpec[i].colType){
+ case "VARCHAR": case "CHAR":{
+ // Add Length to Output Strings
+ if(ATTRIBUTES.alterSpec[i].length IS ""){
+ rawSQL = "#rawSQL#(LengthNotSpecified_#i#)";
+ htmlSQL = "#htmlSQL#(<span class=""Missing"">LengthNotSpecified_#i#</span>)";
+ }else{
+ rawSQL = "#rawSQL#(#ATTRIBUTES.alterSpec[i].length#)";
+ htmlSQL = "#htmlSQL#(<span class=""Number"">#ATTRIBUTES.alterSpec[i].length#</span>)";
+ }
+ // Add Binary to Output Strings if Specified
+ if(ATTRIBUTES.alterSpec[i].binary){
+ rawSQL = "#rawSQL# BINARY";
+ htmlSQL = "#htmlSQL# <span class=""KeyWord"">BINARY</span>";
+ }
+ break;
+ }
+ case "ENUM": case "SET":{
+ // Add Legal Values to Output Strings
+ if(ATTRIBUTES.alterSpec[i].legalValues IS ""){
+ rawSQL = "#rawSQL#(ValuesNotSpecified_#i#)";
+ htmlSQL = "#htmlSQL#(<span class=""Missing"">ValuesNotSpecified_#i#</span>)";
+ }else{
+ // Replace the Carriage Return and Linefeed Characters with a single quote, comma, and a single quote
+ // Also add begining and trailing single quotes so the value list is in the correct format: 'value1','value2',...
+ rawSQL = "#rawSQL#('#Replace(ATTRIBUTES.alterSpec[i].legalValues, "#CRLF#", "','", "ALL")#')";
+ htmlSQL = "#htmlSQL#('<span class=""String"">#Replace(ATTRIBUTES.alterSpec[i].legalValues, "#CRLF#", "</span>','<span class=""String"">", "ALL")#</span>')";
+ }
+ break;
+ }
+
+ case "TINYINT": case "SMALLINT": case "MEDIUMINT": case "INT": case "INTEGER": case "BIGINT":{
+ // Set Integer and Numeric Type to TRUE
+ isIntegerCol = TRUE;
+ isNumericCol = TRUE;
+ // Add Length to Output Strings if Specified
+ if(ATTRIBUTES.alterSpec[i].length IS NOT ""){
+ rawSQL = "#rawSQL#(#ATTRIBUTES.alterSpec[i].length#)";
+ htmlSQL = "#htmlSQL#(<span class=""Number"">#ATTRIBUTES.alterSpec[i].length#</span>)";
+ }
+ break;
+ }
+ case "REAL": case "FLOAT": case "DOUBLE":{
+ // Set Numeric Type to TRUE
+ isNumericCol = TRUE;
+ // Add Length and Decimals to Output Strings if Specified
+ if(ATTRIBUTES.alterSpec[i].length IS NOT ""){
+ rawSQL = "#rawSQL#(#ATTRIBUTES.alterSpec[i].length#,#ATTRIBUTES.alterSpec[i].numberOfDecimals#)";
+ htmlSQL = "#htmlSQL#(<span class=""Number"">#ATTRIBUTES.alterSpec[i].length#</span>,<span class=""Number"">#ATTRIBUTES.alterSpec[i].numberOfDecimals#</span>)";
+ }
+ break;
+ }
+ case "DECIMAL": case "NUMERIC":{
+ // Set Numeric Type to TRUE
+ isNumericCol = TRUE;
+ // Add Length to Output Strings
+ if(ATTRIBUTES.alterSpec[i].length IS "" AND ATTRIBUTES.alterSpec[i].numberOfDecimals IS ""){
+ rawSQL = "#rawSQL#(LengthNotSpecified_#i#,DecimalsNotSpecified_#i#)";
+ htmlSQL = "#htmlSQL#(<span class=""Missing"">LengthNotSpecified_#i#</span>,<span class=""Missing"">DecimalsNotSpecified_#i#</span>)";
+ }else if(ATTRIBUTES.alterSpec[i].length IS ""){
+ rawSQL = "#rawSQL#(LengthNotSpecified_#i#,#ATTRIBUTES.alterSpec[i].numberOfDecimals#)";
+ htmlSQL = "#htmlSQL#(<span class=""Missing"">LengthNotSpecified_#i#</span>,<span class=""Number"">#ATTRIBUTES.alterSpec[i].numberOfDecimals#</span>)";
+ }else if(ATTRIBUTES.alterSpec[i].numberOfDecimals IS ""){
+ rawSQL = "#rawSQL#(#ATTRIBUTES.alterSpec[i].length#,DecimalsNotSpecified_#i#)";
+ htmlSQL = "#htmlSQL#(<span class=""Number"">#ATTRIBUTES.alterSpec[i].length#</span>,<span class=""Missing"">DecimalsNotSpecified_#i#</span>)";
+ }else{
+ rawSQL = "#rawSQL#(#ATTRIBUTES.alterSpec[i].length#,#ATTRIBUTES.alterSpec[i].numberOfDecimals#)";
+ htmlSQL = "#htmlSQL#(<span class=""Number"">#ATTRIBUTES.alterSpec[i].length#</span>,<span class=""Number"">#ATTRIBUTES.alterSpec[i].numberOfDecimals#</span>)";
+ }
+ break;
+ }
+ case "TINYBLOB": case "BLOB": case "MEDIUMBLOB": case "LONGBLOB": case "TINYTEXT": case "TEXT": case "MEDIUMTEXT": case "LONGTEXT":{
+ // Set Text or Blob Type to TRUE
+ isTextOrBlobCol = TRUE;
+ break;
+ }
+ case "DATE": case "TIME": case "DATETIME": case "YEAR": case "TIMESTAMP":{
+ // Set Temporal Type to TRUE
+ isTemporalCol = TRUE;
+ break;
+ // todo Timestamp and Year Length
+ }
+ }
+ </cfscript>
+
+ <cfscript>
+ // Add Unsigned to Output Strings if Specified and is Numeric Column
+ if(ATTRIBUTES.alterSpec[i].unsigned AND isNumericCol){
+ rawSQL = "#rawSQL# UNSIGNED";
+ htmlSQL = "#htmlSQL# <span class=""KeyWord"">UNSIGNED</span>";
+ }
+ // Add Zerofill to Output Strings if Specified and is Numeric Column
+ if(ATTRIBUTES.alterSpec[i].zerofill AND isNumericCol){
+ rawSQL = "#rawSQL# ZEROFILL";
+ htmlSQL = "#htmlSQL# <span class=""KeyWord"">ZEROFILL</span>";
+ }
+ // Add NULL | NOT NULL to Output Strings
+ if(ATTRIBUTES.alterSpec[i].notNull){
+ rawSQL = "#rawSQL# NOT NULL";
+ htmlSQL = "#htmlSQL# <span class=""KeyWord"">NOT NULL</span>";
+ }else{
+ rawSQL = "#rawSQL# NULL";
+ htmlSQL = "#htmlSQL# <span class=""KeyWord"">NULL</span>";
+ }
+ // Add DEFAULT to Output Strings if Specified
+ if(ATTRIBUTES.alterSpec[i].defaultValue IS NOT "" AND NOT isTextOrBlobCol){
+ rawSQL = "#rawSQL# DEFAULT #ATTRIBUTES.alterSpec[i].defaultValue#";
+ htmlSQL = "#htmlSQL# <span class=""KeyWord"">DEFAULT</span> <span class=""String"">#ATTRIBUTES.alterSpec[i].defaultValue#</span>";
+ }
+ // Add AUTO_INCREMENT to Output Strings if Specified and is Integer Column
+ if(ATTRIBUTES.alterSpec[i].autoIncrement AND isIntegerCol){
+ rawSQL = "#rawSQL# AUTO_INCREMENT";
+ htmlSQL = "#htmlSQL# <span class=""KeyWord"">AUTO_INCREMENT</span>";
+ }
+ // Add Single Column PRIMARY KEY to Output Strings if Specified
+ if(ATTRIBUTES.alterSpec[i].key IS "Primary"){
+ rawSQL = "#rawSQL# PRIMARY KEY";
+ htmlSQL = "#htmlSQL# <span class=""KeyWord"">PRIMARY KEY</span>";
+ }
+
// ToDo: [reference_definition]
|
|
From: <nan...@us...> - 2003-06-20 21:14:12
|
Update of /cvsroot/mydatabasepilot/MyDatabasePilot/Query
In directory sc8-pr-cvs1:/tmp/cvs-serv3792/Query
Modified Files:
alterTable.cfm
Log Message:
Internal Structure Changed:
[ 758157 ] Converted Some Code to <CFScript>
Index: alterTable.cfm
===================================================================
RCS file: /cvsroot/mydatabasepilot/MyDatabasePilot/Query/alterTable.cfm,v
retrieving revision 1.20
retrieving revision 1.21
diff -C2 -d -r1.20 -r1.21
*** alterTable.cfm 20 Jun 2003 20:50:53 -0000 1.20
--- alterTable.cfm 20 Jun 2003 21:14:08 -0000 1.21
***************
*** 192,228 ****
<cfset htmlSQL = "#htmlSQL# <span class=""KeyWord"">PRIMARY KEY</span>" />
</cfif>
! <!--- ToDo: [reference_definition] --->
!
! <!---||| Location of new Field : [FIRST | AFTER column_name ] |||--->
! <!--- If location is set to "Beginning" ... --->
! <cfif ATTRIBUTES.alterSpec[i].colLocation IS "Beginning">
! <!--- If it's the first column to be added ... --->
! <cfif i is 1>
! <!--- Add FIRST Keyword to Output Strings --->
! <cfset rawSQL = "#rawSQL# FIRST" />
! <cfset htmlSQL = "#htmlSQL# <span class=""KeyWord"">FIRST</span>" />
! <!--- Otherwise ... --->
! <cfelse>
! <!--- Add AFTER Keyword to Output Strings --->
! <cfset rawSQL = "#rawSQL# AFTER" />
! <cfset htmlSQL = "#htmlSQL# <span class=""KeyWord"">AFTER</span>" />
! <!--- Set index of Last Column --->
! <cfset lastColumn = i-1>
! <!--- Make sure last column to be added has a specified name --->
! <cfif ATTRIBUTES.alterSpec[lastColumn].colName IS "">
! <cfset rawSQL = "#rawSQL# NameNotSpecified_#lastColumn#" />
! <cfset htmlSQL = "#htmlSQL# <span class=""Missing"">NameNotSpecified_#lastColumn#</span>" />
! <!--- Otherwise ... --->
! <cfelse>
! <!--- Set location to AFTER the last column to be added --->
! <cfset rawSQL = "#rawSQL# #ATTRIBUTES.alterSpec[lastColumn].colName#" />
! <cfset htmlSQL = "#htmlSQL# <span class=""String"">#ATTRIBUTES.alterSpec[lastColumn].colName#</span>" />
! </cfif>
! </cfif>
! <!--- Elseif Loctaion is not set to "End", that means a location is specified between other coloumns ... --->
! <cfelseif ATTRIBUTES.alterSpec[i].colLocation IS NOT "End">
! <cfscript>
// Add AFTER Keyword to Output Strings
rawSQL = "#rawSQL# AFTER";
--- 192,229 ----
<cfset htmlSQL = "#htmlSQL# <span class=""KeyWord"">PRIMARY KEY</span>" />
</cfif>
+
+ <cfscript>
+ // ToDo: [reference_definition]
! //-----------------------------------------------------
! // Location of new Field : [FIRST | AFTER column_name ]
! //-----------------------------------------------------
!
! // If location is set to "Beginning" ...
! if(ATTRIBUTES.alterSpec[i].colLocation IS "Beginning"){
! // If it's the first column to be added ...
! if(i IS 1){
! // Add FIRST Keyword to Output Strings
! rawSQL = "#rawSQL# FIRST";
! htmlSQL = "#htmlSQL# <span class=""KeyWord"">FIRST</span>";
! }else{
! // Add AFTER Keyword to Output Strings
! rawSQL = "#rawSQL# AFTER";
! htmlSQL = "#htmlSQL# <span class=""KeyWord"">AFTER</span>";
! lastColumn = i-1; // Set index of Last Column
!
! // Make sure last column to be added has a specified name
! if(ATTRIBUTES.alterSpec[lastColumn].colName IS ""){
! rawSQL = "#rawSQL# NameNotSpecified_#lastColumn#";
! htmlSQL = "#htmlSQL# <span class=""Missing"">NameNotSpecified_#lastColumn#</span>";
! }else{
! // Set location to AFTER the last column to be added
! rawSQL = "#rawSQL# #ATTRIBUTES.alterSpec[lastColumn].colName#";
! htmlSQL = "#htmlSQL# <span class=""String"">#ATTRIBUTES.alterSpec[lastColumn].colName#</span>";
! }
! }
! // Elseif Loctaion is not set to "End", that means a location is specified between other coloumns ...
! }else if(ATTRIBUTES.alterSpec[i].colLocation IS NOT "End"){
// Add AFTER Keyword to Output Strings
rawSQL = "#rawSQL# AFTER";
***************
*** 247,252 ****
}
}
! </cfscript>
! </cfif>
</cfif>
</cfcase>
--- 248,253 ----
}
}
! }
! </cfscript>
</cfif>
</cfcase>
|
|
From: <nan...@us...> - 2003-06-20 20:51:00
|
Update of /cvsroot/mydatabasepilot/MyDatabasePilot/Query
In directory sc8-pr-cvs1:/tmp/cvs-serv32574/Query
Modified Files:
alterTable.cfm
Log Message:
Internal Structure Changed:
[ 758157 ] Converted Some Code to <CFScript>
Index: alterTable.cfm
===================================================================
RCS file: /cvsroot/mydatabasepilot/MyDatabasePilot/Query/alterTable.cfm,v
retrieving revision 1.19
retrieving revision 1.20
diff -C2 -d -r1.19 -r1.20
*** alterTable.cfm 20 Jun 2003 20:21:24 -0000 1.19
--- alterTable.cfm 20 Jun 2003 20:50:53 -0000 1.20
***************
*** 224,251 ****
<!--- Elseif Loctaion is not set to "End", that means a location is specified between other coloumns ... --->
<cfelseif ATTRIBUTES.alterSpec[i].colLocation IS NOT "End">
! <!--- Add AFTER Keyword to Output Strings --->
! <cfset rawSQL = "#rawSQL# AFTER" />
! <cfset htmlSQL = "#htmlSQL# <span class=""KeyWord"">AFTER</span>" />
! <!--- If it's the first column to be added ... --->
! <cfif i is 1>
! <!--- Set location to AFTER the specified location --->
! <cfset rawSQL = "#rawSQL# #ATTRIBUTES.alterSpec[i].colLocation#" />
! <cfset htmlSQL = "#htmlSQL# <span class=""String"">#ATTRIBUTES.alterSpec[i].colLocation#</span>" />
! <!--- Otherwise ... --->
! <cfelse>
! <!--- Set index of Last Column --->
! <cfset lastColumn = i-1>
! <!--- Make sure last column to be added has a specified name --->
! <cfif ATTRIBUTES.alterSpec[lastColumn].colName IS "">
! <cfset rawSQL = "#rawSQL# NameNotSpecified_#lastColumn#" />
! <cfset htmlSQL = "#htmlSQL# <span class=""Missing"">NameNotSpecified_#lastColumn#</span>" />
! <!--- Otherwise ... --->
! <cfelse>
! <!--- Set location to AFTER the last column to be added --->
! <cfset rawSQL = "#rawSQL# #ATTRIBUTES.alterSpec[lastColumn].colName#" />
! <cfset htmlSQL = "#htmlSQL# <span class=""String"">#ATTRIBUTES.alterSpec[lastColumn].colName#</span>" />
! </cfif>
! </cfif>
</cfif>
</cfif>
--- 224,251 ----
<!--- Elseif Loctaion is not set to "End", that means a location is specified between other coloumns ... --->
<cfelseif ATTRIBUTES.alterSpec[i].colLocation IS NOT "End">
! <cfscript>
! // Add AFTER Keyword to Output Strings
! rawSQL = "#rawSQL# AFTER";
! htmlSQL = "#htmlSQL# <span class=""KeyWord"">AFTER</span>";
! // If it's the first column to be added ...
! if(i is 1){
! // Set location to AFTER the specified location
! rawSQL = "#rawSQL# #ATTRIBUTES.alterSpec[i].colLocation#";
! htmlSQL = "#htmlSQL# <span class=""String"">#ATTRIBUTES.alterSpec[i].colLocation#</span>";
! }else{
! // Set index of Last Column
! lastColumn = i-1;
! // Make sure last column to be added has a specified name
! if(ATTRIBUTES.alterSpec[lastColumn].colName IS ""){
! rawSQL = "#rawSQL# NameNotSpecified_#lastColumn#";
! htmlSQL = "#htmlSQL# <span class=""Missing"">NameNotSpecified_#lastColumn#</span>";
! }else{
! // Set location to AFTER the last column to be added
! rawSQL = "#rawSQL# #ATTRIBUTES.alterSpec[lastColumn].colName#";
! htmlSQL = "#htmlSQL# <span class=""String"">#ATTRIBUTES.alterSpec[lastColumn].colName#</span>";
! }
! }
! </cfscript>
</cfif>
</cfif>
|
|
From: <nan...@us...> - 2003-06-20 20:21:27
|
Update of /cvsroot/mydatabasepilot/MyDatabasePilot/dbProcessInit
In directory sc8-pr-cvs1:/tmp/cvs-serv27768/dbProcessInit
Modified Files:
AddField.cfm
Log Message:
Functionality Added:
[ 758146 ] Added "ADD UNIQUE" AlterSpec
Index: AddField.cfm
===================================================================
RCS file: /cvsroot/mydatabasepilot/MyDatabasePilot/dbProcessInit/AddField.cfm,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -d -r1.18 -r1.19
*** AddField.cfm 19 Jun 2003 14:19:52 -0000 1.18
--- AddField.cfm 20 Jun 2003 20:21:24 -0000 1.19
***************
*** 27,31 ****
<cfset alterSpec=ArrayNew(1) />
! <!---||| Loop over each new field |||--->
<cfloop from="1" to="#FORM.numberOfFields#" index="i">
<!---||| Set default values of empty string for FORM fields |||--->
--- 27,32 ----
<cfset alterSpec=ArrayNew(1) />
! <!---||| Create ADD COLUMN alterSpec for each new field |||--->
! <!--- Loop over each new field ... --->
<cfloop from="1" to="#FORM.numberOfFields#" index="i">
<!---||| Set default values of empty string for FORM fields |||--->
***************
*** 70,73 ****
--- 71,100 ----
<cfif IsDefined("FORM.autoIncrement#i#")><cfset alterSpec[i].autoIncrement=TRUE /><cfelse><cfset alterSpec[i].autoIncrement=FALSE /></cfif>
</cfloop>
+
+ <!---||| Create Single Column INDEX,UNIQUE,FULLTEXT alterSpec for each new indexed field |||--->
+ <!--- Loop over each new field and find requested indexes ... --->
+ <cfloop from="1" to="#FORM.numberOfFields#" index="i">
+ <cfscript>
+ /* If its a "Unique" index ... */
+ if(alterSpec[i].key IS "Unique"){
+ tempStruct=StructNew(); // Create a Temporary Structure for each new unique index
+ tempStruct.format="ADD UNIQUE"; // Create Key "format"
+
+ // ToDo [index_name]
+
+ // Create index column names Array
+ tempStruct.index_col_names=ArrayNew(1);
+ tempStruct.index_col_names[1]=alterSpec[i].colName;
+
+ ArrayAppend(alterSpec, tempStruct); // Add the Temporary Sturcture to alterSpec
+ }
+ /* Else If its a plain "Index" ... */
+ // else if(alterSpec[i].key IS "Index"){}
+
+ /* Else If its a "Fulltext" index ... */
+ // else if(alterSpec[i].key IS "Fulltext"){}
+ </cfscript>
+ </cfloop>
+
<!------------------------------------------------->
|
|
From: <nan...@us...> - 2003-06-20 20:21:27
|
Update of /cvsroot/mydatabasepilot/MyDatabasePilot/Query
In directory sc8-pr-cvs1:/tmp/cvs-serv27768/Query
Modified Files:
alterTable.cfm
Log Message:
Functionality Added:
[ 758146 ] Added "ADD UNIQUE" AlterSpec
Index: alterTable.cfm
===================================================================
RCS file: /cvsroot/mydatabasepilot/MyDatabasePilot/Query/alterTable.cfm,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -d -r1.18 -r1.19
*** alterTable.cfm 20 Jun 2003 15:17:51 -0000 1.18
--- alterTable.cfm 20 Jun 2003 20:21:24 -0000 1.19
***************
*** 257,261 ****
<cfcase value="ADD PRIMARY KEY"></cfcase>
<!--- "ADD UNIQUE" Alter Specification --->
! <cfcase value="ADD UNIQUE"></cfcase>
<!--- "ADD FULLTEXT" Alter Specification --->
<cfcase value="ADD FULLTEXT"></cfcase>
--- 257,300 ----
<cfcase value="ADD PRIMARY KEY"></cfcase>
<!--- "ADD UNIQUE" Alter Specification --->
! <cfcase value="ADD UNIQUE">
! <cfscript>
! // Add "ADD UNIQUE" Keywords to Output Strings
! rawSQL = "#rawSQL# ADD UNIQUE";
! htmlSQL = "#htmlSQL#<br /><span class=""KeyWord"">ADD UNIQUE</span>";
!
! // ToDo [index_name]
!
! //-----------------------------------------
! // Add Index Column Names to Output Strings
! //-----------------------------------------
!
! // Add Opening Bracked to Output Strings
! rawSQL = "#rawSQL# (";
! htmlSQL = "#htmlSQL# (";
!
! // Add Index Column Names to Output Strings
! for(j=1; j EQ arrayLen(ATTRIBUTES.alterSpec[i].index_col_names); j=j+1){
! // If this is a multi column index and is not the first Index Column Name, then add a comma to the last Index Column Name
! if(j GT 1){
! rawSQL = "#rawSQL#,";
! htmlSQL = "#htmlSQL#,";
! }
!
! // Add Index Column Name to Output Strings
! if(ATTRIBUTES.alterSpec[i].index_col_names[j] IS ""){
! rawSQL = "#rawSQL#NameNotSpecified";
! htmlSQL = "#htmlSQL#<span class=""Missing"">NameNotSpecified</span>";
! }
! else{
! rawSQL = "#rawSQL##ATTRIBUTES.alterSpec[i].index_col_names[j]#";
! htmlSQL = "#htmlSQL#<span class=""String"">#ATTRIBUTES.alterSpec[i].index_col_names[j]#</span>";
! }
! }
!
! // Add Closing Bracked to Output Strings
! rawSQL = "#rawSQL#)";
! htmlSQL = "#htmlSQL#)";
! </cfscript>
! </cfcase>
<!--- "ADD FULLTEXT" Alter Specification --->
<cfcase value="ADD FULLTEXT"></cfcase>
|
|
From: <nan...@us...> - 2003-06-20 15:17:54
|
Update of /cvsroot/mydatabasepilot/MyDatabasePilot/Query In directory sc8-pr-cvs1:/tmp/cvs-serv5908/Query Modified Files: alterTable.cfm Log Message: Functionality Added: [ 757937 ] Added Single Column Primary Key to AlterTable Query in "ADD COLUMN" format Index: alterTable.cfm =================================================================== RCS file: /cvsroot/mydatabasepilot/MyDatabasePilot/Query/alterTable.cfm,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** alterTable.cfm 18 Jun 2003 15:11:29 -0000 1.17 --- alterTable.cfm 20 Jun 2003 15:17:51 -0000 1.18 *************** *** 187,192 **** <cfset htmlSQL = "#htmlSQL# <span class=""KeyWord"">AUTO_INCREMENT</span>" /> </cfif> ! ! <!--- ToDo: [PRIMARY KEY] [reference_definition] ---> <!---||| Location of new Field : [FIRST | AFTER column_name ] |||---> --- 187,197 ---- <cfset htmlSQL = "#htmlSQL# <span class=""KeyWord"">AUTO_INCREMENT</span>" /> </cfif> ! <!--- Add Single Column PRIMARY KEY to Output Strings if Specified ---> ! <cfif ATTRIBUTES.alterSpec[i].key IS "Primary"> ! <cfset rawSQL = "#rawSQL# PRIMARY KEY" /> ! <cfset htmlSQL = "#htmlSQL# <span class=""KeyWord"">PRIMARY KEY</span>" /> ! </cfif> ! ! <!--- ToDo: [reference_definition] ---> <!---||| Location of new Field : [FIRST | AFTER column_name ] |||---> |