mydatabasepilot-cvs Mailing List for MyDatabase Pilot (Page 2)
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-06-19 15:00:39
|
Update of /cvsroot/mydatabasepilot/MyDatabasePilot/dbProcessBody In directory sc8-pr-cvs1:/tmp/cvs-serv24776/dbProcessBody Modified Files: AddField.cfm Log Message: Functionality Added: [ 757284 ] Added Key preselection logic (check or not checked) to all index types: <cfif #alterSpec[i].key# IS "???"> <cfinput name="key#i#" type="radio" value="???" checked="yes" /> <cfelse> <cfinput name="key#i#" type="radio" value="???" /> </cfif> Index: AddField.cfm =================================================================== RCS file: /cvsroot/mydatabasepilot/MyDatabasePilot/dbProcessBody/AddField.cfm,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** AddField.cfm 13 Jun 2003 18:55:44 -0000 1.11 --- AddField.cfm 19 Jun 2003 15:00:35 -0000 1.12 *************** *** 459,477 **** <!---||| Allow User to Specify a Single Column Index |||---> <td> ! <cfinput name="key#i#" type="radio" value="Primary" /><label class="Fancy">Primary</label><br /> ! <cfinput name="key#i#" type="radio" value="Unique" /><label class="Fancy">Unique</label><br /> <cfswitch expression="#alterSpec[i].colType#"> <cfcase value="TINYTEXT,TEXT,MEDIUMTEXT,LONGTEXT,VARCHAR"> ! <cfinput name="key#i#" type="radio" value="Fulltext" /><label class="Fancy">Fulltext</label><br /> </cfcase> </cfswitch> ! <cfinput name="key#i#" type="radio" value="Index" /><label class="Fancy">Index</label> <cfswitch expression="#alterSpec[i].colType#"> <cfcase value="TINYBLOB,BLOB,MEDIUMBLOB,LONGBLOB,TINYTEXT,TEXT,MEDIUMTEXT,LONGTEXT,CHAR,VARCHAR"> ! Length() </cfcase> </cfswitch> <br /> ! <cfinput name="key#i#" type="radio" value="None" checked="yes" /><label class="Fancy">None</label> </td> </tr> --- 459,506 ---- <!---||| Allow User to Specify a Single Column Index |||---> <td> ! <!--- Primary Key ---> ! <cfif #alterSpec[i].key# IS "Primary"> ! <cfinput name="key#i#" type="radio" value="Primary" checked="yes" /><label class="Fancy">Primary</label><br /> ! <cfelse> ! <cfinput name="key#i#" type="radio" value="Primary" /><label class="Fancy">Primary</label><br /> ! </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 /> ! <cfelse> ! <cfinput name="key#i#" type="radio" value="Unique" /><label class="Fancy">Unique</label><br /> ! </cfif> ! ! <!--- Fulltext Index ---> <cfswitch expression="#alterSpec[i].colType#"> <cfcase value="TINYTEXT,TEXT,MEDIUMTEXT,LONGTEXT,VARCHAR"> ! <cfif #alterSpec[i].key# IS "Fulltext"> ! <cfinput name="key#i#" type="radio" value="Fulltext" checked="yes" /><label class="Fancy">Fulltext</label><br /> ! <cfelse> ! <cfinput name="key#i#" type="radio" value="Fulltext" /><label class="Fancy">Fulltext</label><br /> ! </cfif> </cfcase> </cfswitch> ! ! <!--- Plain Index ---> ! <cfif #alterSpec[i].key# IS "Index"> ! <cfinput name="key#i#" type="radio" value="Index" checked="yes" /><label class="Fancy">Index</label> ! <cfelse> ! <cfinput name="key#i#" type="radio" value="Index" /><label class="Fancy">Index</label> ! </cfif> <cfswitch expression="#alterSpec[i].colType#"> <cfcase value="TINYBLOB,BLOB,MEDIUMBLOB,LONGBLOB,TINYTEXT,TEXT,MEDIUMTEXT,LONGTEXT,CHAR,VARCHAR"> ! <!--- ToDo ---> Length() </cfcase> </cfswitch> <br /> ! ! <!--- No Key ---> ! <cfif #alterSpec[i].key# IS "None"> ! <cfinput name="key#i#" type="radio" value="None" checked="yes" /><label class="Fancy">None</label> ! <cfelse> ! <cfinput name="key#i#" type="radio" value="None" /><label class="Fancy">None</label> ! </cfif> </td> </tr> |
From: <nan...@us...> - 2003-06-19 14:19:55
|
Update of /cvsroot/mydatabasepilot/MyDatabasePilot/dbProcessInit In directory sc8-pr-cvs1:/tmp/cvs-serv17716/dbProcessInit Modified Files: AddField.cfm Log Message: Functionality Added: [ 757257 ] Added Key "key" to alterSpec[i] Index: AddField.cfm =================================================================== RCS file: /cvsroot/mydatabasepilot/MyDatabasePilot/dbProcessInit/AddField.cfm,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** AddField.cfm 18 Jun 2003 15:11:29 -0000 1.17 --- AddField.cfm 19 Jun 2003 14:19:52 -0000 1.18 *************** *** 36,39 **** --- 36,40 ---- <cfparam name="FORM.numberOfDecimals#i#" default="" /> <cfparam name="FORM.defaultValue#i#" default="" /> + <cfparam name="FORM.key#i#" default="None" /> <!---||| Create Structre and Keys |||---> *************** *** 56,59 **** --- 57,62 ---- <!--- 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> |
From: <nan...@us...> - 2003-06-18 15:11:32
|
Update of /cvsroot/mydatabasepilot/MyDatabasePilot/dbProcessInit In directory sc8-pr-cvs1:/tmp/cvs-serv9208/dbProcessInit Modified Files: AddField.cfm Log Message: Functionality Added: [ 756653 ] Added Legal Values to Output Strings for SET and ENUM column types Index: AddField.cfm =================================================================== RCS file: /cvsroot/mydatabasepilot/MyDatabasePilot/dbProcessInit/AddField.cfm,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** AddField.cfm 18 Jun 2003 14:20:29 -0000 1.16 --- AddField.cfm 18 Jun 2003 15:11:29 -0000 1.17 *************** *** 51,59 **** <cfset alterSpec[i].length="#Trim(Evaluate("FORM.length#i#"))#" /> <!--- Create Key "valueList" ---> - - <cfset alterSpec[i].legalValues="#Trim(Evaluate("FORM.legalValues#i#"))#" /> - <!---<cfloop index="p1" list="#Replace(ATTRIBUTES.alterSpec[i].legalValues, "#CRLF#", ",", "ALL")#" delimiters="#Paragraph#"></cfloop>---> - <!--- Create Key "numberOfDecimals" ---> <cfset alterSpec[i].numberOfDecimals="#Trim(Evaluate("FORM.numberOfDecimals#i#"))#" /> --- 51,55 ---- |
From: <nan...@us...> - 2003-06-18 15:11:32
|
Update of /cvsroot/mydatabasepilot/MyDatabasePilot/Query In directory sc8-pr-cvs1:/tmp/cvs-serv9208/Query Modified Files: alterTable.cfm Log Message: Functionality Added: [ 756653 ] Added Legal Values to Output Strings for SET and ENUM column types Index: alterTable.cfm =================================================================== RCS file: /cvsroot/mydatabasepilot/MyDatabasePilot/Query/alterTable.cfm,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** alterTable.cfm 18 Jun 2003 13:33:33 -0000 1.16 --- alterTable.cfm 18 Jun 2003 15:11:29 -0000 1.17 *************** *** 35,40 **** --- 35,43 ---- <!--------------------------------------------> <!---||| Initialize Internal Variables |||---> + <!--- Output Strings ---> <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 |||---> *************** *** 99,106 **** </cfcase> <cfcase value="ENUM,SET"> ! <!--- TODO: ! ENUM(value1,value2,value3,...) ! SET(value1,value2,value3,...) ! ---> </cfcase> <cfcase value="TINYINT,SMALLINT,MEDIUMINT,INT,INTEGER,BIGINT"> --- 102,115 ---- </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"> |
From: <nan...@us...> - 2003-06-18 14:20:32
|
Update of /cvsroot/mydatabasepilot/MyDatabasePilot/dbProcessInit In directory sc8-pr-cvs1:/tmp/cvs-serv672/dbProcessInit Modified Files: AddField.cfm Log Message: Functionality Added: [ 756619 ] Added Trim Function to all text based Form field variables Index: AddField.cfm =================================================================== RCS file: /cvsroot/mydatabasepilot/MyDatabasePilot/dbProcessInit/AddField.cfm,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** AddField.cfm 17 Jun 2003 13:55:54 -0000 1.15 --- AddField.cfm 18 Jun 2003 14:20:29 -0000 1.16 *************** *** 45,59 **** <cfset alterSpec[i].colLocation="#FORM.locationOfFields#" /> <!--- Create Key "colName" ---> ! <cfset alterSpec[i].colName="#Evaluate("FORM.fieldName#i#")#" /> <!--- Create Key "colType" ---> ! <cfset alterSpec[i].colType="#Evaluate("FORM.fieldType#i#")#" /> <!--- Create Key "length" ---> ! <cfset alterSpec[i].length="#Evaluate("FORM.length#i#")#" /> <!--- Create Key "valueList" ---> ! <cfset alterSpec[i].legalValues="#Evaluate("FORM.legalValues#i#")#" /> <!--- Create Key "numberOfDecimals" ---> ! <cfset alterSpec[i].numberOfDecimals="#Evaluate("FORM.numberOfDecimals#i#")#" /> <!--- Create Key "defaultValue" ---> ! <cfset alterSpec[i].defaultValue="#Evaluate("FORM.defaultValue#i#")#" /> <!--- Create Key "binary" ---> <cfif IsDefined("FORM.binary#i#")><cfset alterSpec[i].binary=TRUE /><cfelse><cfset alterSpec[i].binary=FALSE /></cfif> --- 45,63 ---- <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#"))#" /> ! <!---<cfloop index="p1" list="#Replace(ATTRIBUTES.alterSpec[i].legalValues, "#CRLF#", ",", "ALL")#" delimiters="#Paragraph#"></cfloop>---> ! <!--- 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 "binary" ---> <cfif IsDefined("FORM.binary#i#")><cfset alterSpec[i].binary=TRUE /><cfelse><cfset alterSpec[i].binary=FALSE /></cfif> |
From: <nan...@us...> - 2003-06-18 14:03:34
|
Update of /cvsroot/mydatabasepilot/MyDatabasePilot In directory sc8-pr-cvs1:/tmp/cvs-serv30459 Modified Files: Application.cfm Log Message: Functionality Added: [ 756607 ] Added local scope variable CRLF to Application.cfm. This variable is a New Line Break: Carriage Return and Linefeed Characters, and is used as delimiters. <cfset CRLF="#Chr(13)##Chr(10)#" /> Index: Application.cfm =================================================================== RCS file: /cvsroot/mydatabasepilot/MyDatabasePilot/Application.cfm,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** Application.cfm 23 May 2003 04:11:19 -0000 1.16 --- Application.cfm 18 Jun 2003 14:03:31 -0000 1.17 *************** *** 1,141 **** ! <!---******************************************************************************************* ! * Copyright: MyDatabase Pilot is distributed under the terms of the GNU GPL license * ! * Template: Application.cfm * ! * Purpose: - Creates Client variables for personalization * ! * - Creates Session variables for connecting to database * ! * - Application wide variables, functions and errorhandling * ! ********************************************************************************************---> ! ! <!----------------------------------------------------------> ! <!--- Set application name and enable sesson variables ---> ! <!--- and enable client variables in the form of cookies ---> ! <!----------------------------------------------------------> ! <cfapplication name="MyDatabasePilot-0.7.2.a" applicationtimeout="#CreateTimeSpan(2,0,0,0)#" ! clientmanagement="yes" setclientcookies="yes" setdomaincookies="no" ! sessionmanagement="yes" sessiontimeout="#CreateTimeSpan(0,0,15,0)#"> ! ! <!-------------------------> ! <!--- Used in Debugging ---> ! <!-------------------------> ! <!---<cfsetting showdebugoutput="No"> Specifies whether to show debugging output---> ! <!---<cfsetting enablecfoutputonly="yes"> Disables output of text that is not included inside cfoutput tags---> ! <!---<cfsetting requestTimeOut = "value in seconds"> You can use this setting to increase the page time-out if your application or page frequently accesses external resources that might be particularly slow---> ! ! <!----------------------------------------------> ! <!--- Set custom global error handling pages ---> ! <!----------------------------------------------> ! <!--- This is on the ToDo list ! <cferror type="exception" template="ErrorHandling/ExceptionErr.cfm"> ! <cferror type="monitor" template="ErrorHandling/MonitorErr.cfm"> ! <cferror type="request" template="ErrorHandling/RequestErr.cfm"> ! <cferror type="validation" template="ErrorHandling/ValidationErr.cfm"> ! ---> ! ! <!----------------------------------------> ! <!--- Initialize Application Variables ---> ! <!----------------------------------------> ! <!--- Initiate an Exclusive lock to ensure the integrity of Application variables ---> ! <cflock timeout = "30" throwontimeout="no" type = "exclusive" scope = "APPLICATION"> ! <!--- Ensure Application Name has not Expired ---> ! <cfif NOT IsDefined("APPLICATION.name")><cfset application.name = "MyDatabase Pilot"></cfif> ! <!--- Ensure Application Version has not Expired ---> ! <cfif NOT IsDefined("APPLICATION.version")><cfset application.version = "v0.7.2(Alpha)"></cfif> ! <!--- Ensure Application Release Date has not Expired ---> ! <cfif NOT IsDefined("APPLICATION.releaseDate")><cfset application.releaseDate = "1 Jun 2003"></cfif> ! <!--- Initiate a Read Only lock to ensure the integrity of SERVER variables ---> ! <cflock timeout = "10" throwontimeout="no" type = "readonly" scope = "SERVER"> ! <cfscript> ! // Ensure isMX_Compatible is set, this is used for MX specific coding such as CFCs ! if(NOT IsDefined("APPLICATION.isMX_Compatible")){ ! if(Left(SERVER.ColdFusion.ProductVersion,1) GTE 6){ // If the product version is 6 or higher ... ! APPLICATION.isMX_Compatible = TRUE; // then CFServer is MX compatible. ! }else{ // Otherwise, ! APPLICATION.isMX_Compatible = FALSE; // CFServer is not MX compatible. ! } ! } ! </cfscript> ! </cflock> ! </cflock> ! ! <!-----------------------------------> ! <!--- Initialize Client Variables ---> ! <!-----------------------------------> ! <!--- Initiate an Exclusive lock to ensure the integrity of Client variables ---> ! <cflock name="clientDefaultSettings" timeout = "30" throwontimeout="no" type = "exclusive"> ! <!--- Used to limit number of records returned from a query ---> ! <cfparam name="CLIENT.defaultMaxRows" default=20> ! <!--- Used to repeat the table headers after specified number of rows/records ---> ! <cfparam name="CLIENT.defaultRepeatHeaders" default="50"> ! </cflock> ! ! <!------------------------------------> ! <!--- Initialize Session Variables ---> ! <!------------------------------------> ! <!--- NOTE FOR SERVER CLUSTERS: ! Since Session Variables can not be used in server clusters except those that support sticky sessions, ! this section (and anything that is dependent on Session Variables) may need to be rewritten as Client ! Variables for server clusters (We will see how many users actually run server cluster before spending ! to much time on this.)---> ! <!--- Initiate an Exclusive lock to ensure the integrity of Session variables ---> ! <cflock timeout = "30" throwontimeout="no" type = "exclusive" scope = "SESSION"> ! <!---||| Initialize connection variables used by queries to connect to the database |||---> ! <!--- If dataSource does not exist ... ---> ! <cfif NOT IsDefined("SESSION.dataSource")> ! <!--- NOTE FOR DEFAULT DATABASE USERS: ! If you choose to configure a default database, you must set the dataSource, userName and password ! variables to an actual database that you have complete access to ---> ! <!--- Initialize connection variables ---> ! <cfset SESSION.dataSource = ""> <!--- Enter default Data Source ---> ! <cfset SESSION.userName = ""> <!--- Enter default User Name ---> ! <cfset SESSION.password = ""> <!--- Enter default password ---> ! </cfif> ! ! <!---||| Ensure User is Logged In and Session has not Expired |||---> ! <!--- If session is new or has expired ... ---> ! <cfif NOT IsDefined("SESSION.loggedIn")> ! <!--- Check if default dataSource was configured ---> ! <!--- If dataSource is empty string ... ---> ! <cfif SESSION.dataSource IS ""> ! <!--- this would indicate that no default data source was provided and user is not logged into any datasource ---> ! <cfset SESSION.loggedIn = 0> ! <!--- Redirect User to login form ---> ! <cflocation url="index.cfm"> ! <cfelse> ! <!--- Otherwise user is logged in using default datasource configuration ---> ! <cfset SESSION.loggedIn = 1> ! </cfif> ! </cfif> ! ! <!---||| Initialize dbName |||---> ! <!--- If dbName does not exist, and user is logged in ... ---> ! <cfif NOT IsDefined("SESSION.dbName") AND SESSION.loggedIn IS TRUE> ! <!--- Get Database Name ---> ! <cfmodule template="Query/thisDatabaseName.cfm" ! queryName="thisDatabaseName" ! datasource="#SESSION.dataSource#" ! username="#SESSION.userName#" ! password="#SESSION.password#"> ! <!--- Set dbName Variable with result of thisDatabaseName Query ---> ! <cfset SESSION.dbName = "#thisDatabaseName.databaseName#"> ! </cfif> ! </cflock> ! ! <!---------------------------------------------------------> ! <!--- Initialize Application-Wide Local scope variables ---> ! <!---------------------------------------------------------> ! <cfset mainpage = "MyDatabasePilot.cfm"> ! <cfset currentPath = "#CGI.path_info#"> ! <!--- Set currentDir by Striping the currentPath string variable of the first occurance of the following: ! One or more alpha numeric charachters or uncerscore followed by .cfm or .CFM ---> ! <cfset currentDir = REReplace(currentPath, "[[:alnum:]_]+(.cfm|.CFM)", "", "ONE")> ! <cfset currentQueryString = "#CGI.query_string#"> ! <cfset currentPage = "#currentPath#?#currentQueryString#"> ! <!--- The Main Menu is Visible by Default ---> ! <cfset mainMenuIsVisible = TRUE> ! ! <!---------------------------------------------------------> ! <!--- Include User-Defined Functions Used on Most Pages ---> ! <!---------------------------------------------------------> ! <!--- A need for this has not yet been determined ! <cfinclude template="Functions/SomeFunction.cfm"> ---> --- 1,143 ---- ! <!---******************************************************************************************* ! * Copyright: MyDatabase Pilot is distributed under the terms of the GNU GPL license * ! * Template: Application.cfm * ! * Purpose: - Creates Client variables for personalization * ! * - Creates Session variables for connecting to database * ! * - Application wide variables, functions and errorhandling * ! ********************************************************************************************---> ! ! <!----------------------------------------------------------> ! <!--- Set application name and enable sesson variables ---> ! <!--- and enable client variables in the form of cookies ---> ! <!----------------------------------------------------------> ! <cfapplication name="MyDatabasePilot-0.7.2.a" applicationtimeout="#CreateTimeSpan(2,0,0,0)#" ! clientmanagement="yes" setclientcookies="yes" setdomaincookies="no" ! sessionmanagement="yes" sessiontimeout="#CreateTimeSpan(0,0,15,0)#"> ! ! <!-------------------------> ! <!--- Used in Debugging ---> ! <!-------------------------> ! <!---<cfsetting showdebugoutput="No"> Specifies whether to show debugging output---> ! <!---<cfsetting enablecfoutputonly="yes"> Disables output of text that is not included inside cfoutput tags---> ! <!---<cfsetting requestTimeOut = "value in seconds"> You can use this setting to increase the page time-out if your application or page frequently accesses external resources that might be particularly slow---> ! ! <!----------------------------------------------> ! <!--- Set custom global error handling pages ---> ! <!----------------------------------------------> ! <!--- This is on the ToDo list ! <cferror type="exception" template="ErrorHandling/ExceptionErr.cfm"> ! <cferror type="monitor" template="ErrorHandling/MonitorErr.cfm"> ! <cferror type="request" template="ErrorHandling/RequestErr.cfm"> ! <cferror type="validation" template="ErrorHandling/ValidationErr.cfm"> ! ---> ! ! <!----------------------------------------> ! <!--- Initialize Application Variables ---> ! <!----------------------------------------> ! <!--- Initiate an Exclusive lock to ensure the integrity of Application variables ---> ! <cflock timeout = "30" throwontimeout="no" type = "exclusive" scope = "APPLICATION"> ! <!--- Ensure Application Name has not Expired ---> ! <cfif NOT IsDefined("APPLICATION.name")><cfset application.name = "MyDatabase Pilot" /></cfif> ! <!--- Ensure Application Version has not Expired ---> ! <cfif NOT IsDefined("APPLICATION.version")><cfset application.version = "v0.7.2(Alpha)" /></cfif> ! <!--- Ensure Application Release Date has not Expired ---> ! <cfif NOT IsDefined("APPLICATION.releaseDate")><cfset application.releaseDate = "1 Jun 2003" /></cfif> ! <!--- Initiate a Read Only lock to ensure the integrity of SERVER variables ---> ! <cflock timeout = "10" throwontimeout="no" type = "readonly" scope = "SERVER"> ! <cfscript> ! // Ensure isMX_Compatible is set, this is used for MX specific coding such as CFCs ! if(NOT IsDefined("APPLICATION.isMX_Compatible")){ ! if(Left(SERVER.ColdFusion.ProductVersion,1) GTE 6){ // If the product version is 6 or higher ... ! APPLICATION.isMX_Compatible = TRUE; // then CFServer is MX compatible. ! }else{ // Otherwise, ! APPLICATION.isMX_Compatible = FALSE; // CFServer is not MX compatible. ! } ! } ! </cfscript> ! </cflock> ! </cflock> ! ! <!-----------------------------------> ! <!--- Initialize Client Variables ---> ! <!-----------------------------------> ! <!--- Initiate an Exclusive lock to ensure the integrity of Client variables ---> ! <cflock name="clientDefaultSettings" timeout = "30" throwontimeout="no" type = "exclusive"> ! <!--- Used to limit number of records returned from a query ---> ! <cfparam name="CLIENT.defaultMaxRows" default=20 /> ! <!--- Used to repeat the table headers after specified number of rows/records ---> ! <cfparam name="CLIENT.defaultRepeatHeaders" default="50" /> ! </cflock> ! ! <!------------------------------------> ! <!--- Initialize Session Variables ---> ! <!------------------------------------> ! <!--- NOTE FOR SERVER CLUSTERS: ! Since Session Variables can not be used in server clusters except those that support sticky sessions, ! this section (and anything that is dependent on Session Variables) may need to be rewritten as Client ! Variables for server clusters (We will see how many users actually run server cluster before spending ! to much time on this.)---> ! <!--- Initiate an Exclusive lock to ensure the integrity of Session variables ---> ! <cflock timeout = "30" throwontimeout="no" type = "exclusive" scope = "SESSION"> ! <!---||| Initialize connection variables used by queries to connect to the database |||---> ! <!--- If dataSource does not exist ... ---> ! <cfif NOT IsDefined("SESSION.dataSource")> ! <!--- NOTE FOR DEFAULT DATABASE USERS: ! If you choose to configure a default database, you must set the dataSource, userName and password ! variables to an actual database that you have complete access to ---> ! <!--- Initialize connection variables ---> ! <cfset SESSION.dataSource = "" /> <!--- Enter default Data Source ---> ! <cfset SESSION.userName = "" /> <!--- Enter default User Name ---> ! <cfset SESSION.password = "" /> <!--- Enter default password ---> ! </cfif> ! ! <!---||| Ensure User is Logged In and Session has not Expired |||---> ! <!--- If session is new or has expired ... ---> ! <cfif NOT IsDefined("SESSION.loggedIn")> ! <!--- Check if default dataSource was configured ---> ! <!--- If dataSource is empty string ... ---> ! <cfif SESSION.dataSource IS ""> ! <!--- this would indicate that no default data source was provided and user is not logged into any datasource ---> ! <cfset SESSION.loggedIn = 0 /> ! <!--- Redirect User to login form ---> ! <cflocation url="index.cfm" /> ! <cfelse> ! <!--- Otherwise user is logged in using default datasource configuration ---> ! <cfset SESSION.loggedIn = 1 /> ! </cfif> ! </cfif> ! ! <!---||| Initialize dbName |||---> ! <!--- If dbName does not exist, and user is logged in ... ---> ! <cfif NOT IsDefined("SESSION.dbName") AND SESSION.loggedIn IS TRUE> ! <!--- Get Database Name ---> ! <cfmodule template="Query/thisDatabaseName.cfm" ! queryName="thisDatabaseName" ! datasource="#SESSION.dataSource#" ! username="#SESSION.userName#" ! password="#SESSION.password#" /> ! <!--- Set dbName Variable with result of thisDatabaseName Query ---> ! <cfset SESSION.dbName = "#thisDatabaseName.databaseName#" /> ! </cfif> ! </cflock> ! ! <!---------------------------------------------------------> ! <!--- Initialize Application-Wide Local scope variables ---> ! <!---------------------------------------------------------> ! <cfset mainpage = "MyDatabasePilot.cfm" /> ! <cfset currentPath = "#CGI.path_info#" /> ! <!--- Set currentDir by Striping the currentPath string variable of the first occurance of the following: ! One or more alpha numeric charachters or uncerscore followed by .cfm or .CFM ---> ! <cfset currentDir = REReplace(currentPath, "[[:alnum:]_]+(.cfm|.CFM)", "", "ONE") /> ! <cfset currentQueryString = "#CGI.query_string#" /> ! <cfset currentPage = "#currentPath#?#currentQueryString#" /> ! <!--- The Main Menu is Visible by Default ---> ! <cfset mainMenuIsVisible = TRUE /> ! <!--- New Line Break: Carriage Return and Linefeed Characters used as delimiters ---> ! <cfset CRLF="#Chr(13)##Chr(10)#" /> ! ! <!---------------------------------------------------------> ! <!--- Include User-Defined Functions Used on Most Pages ---> ! <!---------------------------------------------------------> ! <!--- A need for this has not yet been determined ! <cfinclude template="Functions/SomeFunction.cfm"> ---> |
From: <nan...@us...> - 2003-06-18 13:33:40
|
Update of /cvsroot/mydatabasepilot/MyDatabasePilot/Query In directory sc8-pr-cvs1:/tmp/cvs-serv25588/Query Modified Files: alterTable.cfm Log Message: Functionality Added: [ 756592 ] Added Logic for location "FIRST" when adding a new column to a table Index: alterTable.cfm =================================================================== RCS file: /cvsroot/mydatabasepilot/MyDatabasePilot/Query/alterTable.cfm,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** alterTable.cfm 17 Jun 2003 21:12:22 -0000 1.15 --- alterTable.cfm 18 Jun 2003 13:33:33 -0000 1.16 *************** *** 184,190 **** <!--- If location is set to "Beginning" ... ---> <cfif ATTRIBUTES.alterSpec[i].colLocation IS "Beginning"> ! <!--- ToDo: ---> ! ! <!--- Elseif Loctaion is not End, that means a location is specified between other coloumns ... ---> <cfelseif ATTRIBUTES.alterSpec[i].colLocation IS NOT "End"> <!--- Add AFTER Keyword to Output Strings ---> --- 184,212 ---- <!--- 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"> <!--- Add AFTER Keyword to Output Strings ---> |
From: <nan...@us...> - 2003-06-17 21:12:25
|
Update of /cvsroot/mydatabasepilot/MyDatabasePilot/Query In directory sc8-pr-cvs1:/tmp/cvs-serv21681/Query Modified Files: alterTable.cfm Log Message: Functionality Added: [ 756232 ] Added Logic for "After col_Name" in ALTER TABLE query Index: alterTable.cfm =================================================================== RCS file: /cvsroot/mydatabasepilot/MyDatabasePilot/Query/alterTable.cfm,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** alterTable.cfm 16 Jun 2003 21:06:43 -0000 1.14 --- alterTable.cfm 17 Jun 2003 21:12:22 -0000 1.15 *************** *** 35,44 **** <!--------------------------------------------> <!---||| Initialize Internal Variables |||---> ! <cfset rawSQL = "ALTER TABLE"> ! <cfset htmlSQL = "<span class=""KeyWord"">ALTER TABLE</span>"> <!---||| Table Name |||---> ! <cfset rawSQL = "#rawSQL# #ATTRIBUTES.table#"> ! <cfset htmlSQL = "#htmlSQL# <span class=""String"">#ATTRIBUTES.table#</span>"> <!---||| Alter Specifications |||---> --- 35,44 ---- <!--------------------------------------------> <!---||| Initialize Internal Variables |||---> ! <cfset rawSQL = "ALTER TABLE" /> ! <cfset htmlSQL = "<span class=""KeyWord"">ALTER TABLE</span>" /> <!---||| Table Name |||---> ! <cfset rawSQL = "#rawSQL# #ATTRIBUTES.table#" /> ! <cfset htmlSQL = "#htmlSQL# <span class=""String"">#ATTRIBUTES.table#</span>" /> <!---||| Alter Specifications |||---> *************** *** 47,74 **** <!--- If this is not the first alter specification add a comma to the last alterSpec ---> <cfif i GT 1> ! <cfset rawSQL = "#rawSQL#,"> ! <cfset htmlSQL = "#htmlSQL#,"> </cfif> <!--- Determine the alterSpec format ---> <cfswitch expression="#ATTRIBUTES.alterSpec[i].format#"> <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 ---> --- 47,75 ---- <!--- If this is not the first alter specification add a comma to the last alterSpec ---> <cfif i GT 1> ! <cfset rawSQL = "#rawSQL#," /> ! <cfset htmlSQL = "#htmlSQL#," /> </cfif> <!--- Determine the alterSpec format ---> <cfswitch expression="#ATTRIBUTES.alterSpec[i].format#"> + <!--- "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 ---> *************** *** 78,83 **** <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 ---> <cfswitch expression="#ATTRIBUTES.alterSpec[i].colType#"> --- 79,84 ---- <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 ---> <cfswitch expression="#ATTRIBUTES.alterSpec[i].colType#"> *************** *** 85,98 **** <!--- 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> --- 86,99 ---- <!--- 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> *************** *** 109,114 **** <!--- 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> --- 110,115 ---- <!--- 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> *************** *** 118,123 **** <!--- 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> --- 119,124 ---- <!--- 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> *************** *** 127,141 **** <!--- 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> --- 128,142 ---- <!--- 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> *************** *** 151,201 **** <!--- 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> <!--- ToDo: [PRIMARY KEY] [reference_definition] ---> ! <!--- ToDo: [FIRST | AFTER column_name ]---> </cfif> </cfcase> <!--- ToDo Cases: ---> <cfcase value="ADD INDEX"></cfcase> <cfcase value="ADD PRIMARY KEY"></cfcase> <cfcase value="ADD UNIQUE"></cfcase> <cfcase value="ADD FULLTEXT"></cfcase> <cfcase value="ADD FOREIGN KEY"></cfcase> <cfcase value="ALTER COLUMN"></cfcase> <cfcase value="CHANGE COLUMN"></cfcase> <cfcase value="MODIFY COLUMN"></cfcase> <cfcase value="DROP COLUMN"></cfcase> <cfcase value="DROP PRIMARY KEY"></cfcase> <cfcase value="DROP INDEX"></cfcase> <cfcase value="DISABLE KEYS"></cfcase> <cfcase value="ENABLE KEYS"></cfcase> <cfcase value="RENAME TO"></cfcase> <cfcase value="ORDER BY"></cfcase> <cfcase value="table_options"></cfcase> </cfswitch> --- 152,250 ---- <!--- 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> <!--- ToDo: [PRIMARY KEY] [reference_definition] ---> ! ! <!---||| Location of new Field : [FIRST | AFTER column_name ] |||---> ! <!--- If location is set to "Beginning" ... ---> ! <cfif ATTRIBUTES.alterSpec[i].colLocation IS "Beginning"> ! <!--- ToDo: ---> ! ! <!--- Elseif Loctaion is not 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> </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"></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> |
From: <nan...@us...> - 2003-06-17 13:55:58
|
Update of /cvsroot/mydatabasepilot/MyDatabasePilot/dbProcessInit In directory sc8-pr-cvs1:/tmp/cvs-serv6205/dbProcessInit Modified Files: AddField.cfm Log Message: Functionality Added: [ 755920 ] Added Key "colLocation" Index: AddField.cfm =================================================================== RCS file: /cvsroot/mydatabasepilot/MyDatabasePilot/dbProcessInit/AddField.cfm,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** AddField.cfm 16 Jun 2003 19:52:36 -0000 1.14 --- AddField.cfm 17 Jun 2003 13:55:54 -0000 1.15 *************** *** 42,45 **** --- 42,47 ---- <!--- 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="#Evaluate("FORM.fieldName#i#")#" /> |
From: <nan...@us...> - 2003-06-16 21:06:45
|
Update of /cvsroot/mydatabasepilot/MyDatabasePilot/Query In directory sc8-pr-cvs1:/tmp/cvs-serv31607/Query Modified Files: alterTable.cfm Log Message: Functionality Added: [ 755539 ] Added isTextOrBlobCol and isTemporalCol Index: alterTable.cfm =================================================================== RCS file: /cvsroot/mydatabasepilot/MyDatabasePilot/Query/alterTable.cfm,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** alterTable.cfm 16 Jun 2003 20:36:45 -0000 1.13 --- alterTable.cfm 16 Jun 2003 21:06:43 -0000 1.14 *************** *** 72,78 **** <cfset htmlSQL = "#htmlSQL# <span class=""Missing"">DataTypeNotSpecified_#i#</span>"> <cfelse> ! <!--- Initialize Integer and Numeric Type to FALSE ---> <cfset isIntegerCol = FALSE /> <cfset isNumericCol = FALSE /> <!--- Add Column Type to Output Strings ---> <cfset rawSQL = "#rawSQL# #ATTRIBUTES.alterSpec[i].colType#"> --- 72,80 ---- <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#"> *************** *** 138,142 **** </cfif> </cfcase> ! <!--- NO Specific Options (Only Generic like Is NULL) for TINYBLOB,BLOB,MEDIUMBLOB,LONGBLOB,TINYTEXT,TEXT,MEDIUMTEXT,LONGTEXT,DATE,TIME,DATETIME,YEAR,TIMESTAMP---> </cfswitch> <!--- Add Unsigned to Output Strings if Specified and is Numeric Column ---> --- 140,151 ---- </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 ---> *************** *** 159,163 **** </cfif> <!--- Add DEFAULT to Output Strings if Specified ---> ! <cfif ATTRIBUTES.alterSpec[i].defaultValue IS NOT ""> <cfset rawSQL = "#rawSQL# DEFAULT #ATTRIBUTES.alterSpec[i].defaultValue#"> <cfset htmlSQL = "#htmlSQL# <span class=""KeyWord"">DEFAULT</span> <span class=""String"">#ATTRIBUTES.alterSpec[i].defaultValue#</span>"> --- 168,172 ---- </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>"> |
From: <nan...@us...> - 2003-06-16 20:36:48
|
Update of /cvsroot/mydatabasepilot/MyDatabasePilot/Query In directory sc8-pr-cvs1:/tmp/cvs-serv24997/Query Modified Files: alterTable.cfm Log Message: Functionality Added: [ 755523 ] Added AUTO_INCREMENT to Integer Types Index: alterTable.cfm =================================================================== RCS file: /cvsroot/mydatabasepilot/MyDatabasePilot/Query/alterTable.cfm,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** alterTable.cfm 16 Jun 2003 17:50:41 -0000 1.12 --- alterTable.cfm 16 Jun 2003 20:36:45 -0000 1.13 *************** *** 72,75 **** --- 72,79 ---- <cfset htmlSQL = "#htmlSQL# <span class=""Missing"">DataTypeNotSpecified_#i#</span>"> <cfelse> + <!--- Initialize Integer and Numeric Type to FALSE ---> + <cfset isIntegerCol = FALSE /> + <cfset isNumericCol = 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>"> *************** *** 98,101 **** --- 102,108 ---- </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 ""> *************** *** 103,118 **** <cfset htmlSQL = "#htmlSQL#(<span class=""Number"">#ATTRIBUTES.alterSpec[i].length#</span>)"> </cfif> - <!--- Add Unsigned to Output Strings if Specified ---> - <cfif ATTRIBUTES.alterSpec[i].unsigned> - <cfset rawSQL = "#rawSQL# UNSIGNED"> - <cfset htmlSQL = "#htmlSQL# <span class=""KeyWord"">UNSIGNED</span>"> - </cfif> - <!--- Add Zerofill to Output Strings if Specified ---> - <cfif ATTRIBUTES.alterSpec[i].zerofill> - <cfset rawSQL = "#rawSQL# ZEROFILL"> - <cfset htmlSQL = "#htmlSQL# <span class=""KeyWord"">ZEROFILL</span>"> - </cfif> </cfcase> <cfcase value="REAL,FLOAT,DOUBLE"> <!--- Add Length and Decimals to Output Strings if Specified ---> <cfif ATTRIBUTES.alterSpec[i].length IS NOT ""> --- 110,117 ---- <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 ""> *************** *** 120,135 **** <cfset htmlSQL = "#htmlSQL#(<span class=""Number"">#ATTRIBUTES.alterSpec[i].length#</span>,<span class=""Number"">#ATTRIBUTES.alterSpec[i].numberOfDecimals#</span>)"> </cfif> - <!--- Add Unsigned to Output Strings if Specified ---> - <cfif ATTRIBUTES.alterSpec[i].unsigned> - <cfset rawSQL = "#rawSQL# UNSIGNED"> - <cfset htmlSQL = "#htmlSQL# <span class=""KeyWord"">UNSIGNED</span>"> - </cfif> - <!--- Add Zerofill to Output Strings if Specified ---> - <cfif ATTRIBUTES.alterSpec[i].zerofill> - <cfset rawSQL = "#rawSQL# ZEROFILL"> - <cfset htmlSQL = "#htmlSQL# <span class=""KeyWord"">ZEROFILL</span>"> - </cfif> </cfcase> <cfcase value="DECIMAL,NUMERIC"> <!--- Add Length to Output Strings ---> <cfif ATTRIBUTES.alterSpec[i].length IS "" AND ATTRIBUTES.alterSpec[i].numberOfDecimals IS ""> --- 119,126 ---- <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 ""> *************** *** 146,162 **** <cfset htmlSQL = "#htmlSQL#(<span class=""Number"">#ATTRIBUTES.alterSpec[i].length#</span>,<span class=""Number"">#ATTRIBUTES.alterSpec[i].numberOfDecimals#</span>)"> </cfif> - <!--- Add Unsigned to Output Strings if Specified ---> - <cfif ATTRIBUTES.alterSpec[i].unsigned> - <cfset rawSQL = "#rawSQL# UNSIGNED"> - <cfset htmlSQL = "#htmlSQL# <span class=""KeyWord"">UNSIGNED</span>"> - </cfif> - <!--- Add Zerofill to Output Strings if Specified ---> - <cfif ATTRIBUTES.alterSpec[i].zerofill> - <cfset rawSQL = "#rawSQL# ZEROFILL"> - <cfset htmlSQL = "#htmlSQL# <span class=""KeyWord"">ZEROFILL</span>"> - </cfif> </cfcase> <!--- NO Specific Options (Only Generic like Is NULL) for TINYBLOB,BLOB,MEDIUMBLOB,LONGBLOB,TINYTEXT,TEXT,MEDIUMTEXT,LONGTEXT,DATE,TIME,DATETIME,YEAR,TIMESTAMP---> </cfswitch> <!--- Add NULL | NOT NULL to Output Strings ---> <cfif ATTRIBUTES.alterSpec[i].notNull> --- 137,153 ---- <cfset htmlSQL = "#htmlSQL#(<span class=""Number"">#ATTRIBUTES.alterSpec[i].length#</span>,<span class=""Number"">#ATTRIBUTES.alterSpec[i].numberOfDecimals#</span>)"> </cfif> </cfcase> <!--- NO Specific Options (Only Generic like Is NULL) for TINYBLOB,BLOB,MEDIUMBLOB,LONGBLOB,TINYTEXT,TEXT,MEDIUMTEXT,LONGTEXT,DATE,TIME,DATETIME,YEAR,TIMESTAMP---> </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> *************** *** 167,177 **** <cfset htmlSQL = "#htmlSQL# <span class=""KeyWord"">NULL</span>"> </cfif> ! <!--- Add DEFAULT to Output Strings ---> <cfif ATTRIBUTES.alterSpec[i].defaultValue IS NOT ""> <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> ! <!--- ToDo: [AUTO_INCREMENT] [PRIMARY KEY] [reference_definition] ---> <!--- ToDo: [FIRST | AFTER column_name ]---> </cfif> --- 158,173 ---- <cfset htmlSQL = "#htmlSQL# <span class=""KeyWord"">NULL</span>"> </cfif> ! <!--- Add DEFAULT to Output Strings if Specified ---> <cfif ATTRIBUTES.alterSpec[i].defaultValue IS NOT ""> <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> ! <!--- ToDo: [PRIMARY KEY] [reference_definition] ---> <!--- ToDo: [FIRST | AFTER column_name ]---> </cfif> |
From: <nan...@us...> - 2003-06-16 19:52:40
|
Update of /cvsroot/mydatabasepilot/MyDatabasePilot/dbProcessInit In directory sc8-pr-cvs1:/tmp/cvs-serv16012/dbProcessInit Modified Files: AddField.cfm Log Message: Functionality Added: [ 755505 ] Added Key "autoIncrement" Index: AddField.cfm =================================================================== RCS file: /cvsroot/mydatabasepilot/MyDatabasePilot/dbProcessInit/AddField.cfm,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** AddField.cfm 16 Jun 2003 16:12:22 -0000 1.13 --- AddField.cfm 16 Jun 2003 19:52:36 -0000 1.14 *************** *** 62,65 **** --- 62,67 ---- <!--- 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> |
From: <nan...@us...> - 2003-06-16 17:50:44
|
Update of /cvsroot/mydatabasepilot/MyDatabasePilot/Query In directory sc8-pr-cvs1:/tmp/cvs-serv28027/Query Modified Files: alterTable.cfm Log Message: Functionality Added: [ 755453 ] Added Default Values to Output Strings Index: alterTable.cfm =================================================================== RCS file: /cvsroot/mydatabasepilot/MyDatabasePilot/Query/alterTable.cfm,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** alterTable.cfm 16 Jun 2003 16:18:13 -0000 1.11 --- alterTable.cfm 16 Jun 2003 17:50:41 -0000 1.12 *************** *** 167,172 **** <cfset htmlSQL = "#htmlSQL# <span class=""KeyWord"">NULL</span>"> </cfif> ! ! <!--- ToDo: [DEFAULT default_value] [AUTO_INCREMENT] [PRIMARY KEY] [reference_definition] ---> <!--- ToDo: [FIRST | AFTER column_name ]---> </cfif> --- 167,177 ---- <cfset htmlSQL = "#htmlSQL# <span class=""KeyWord"">NULL</span>"> </cfif> ! <!--- Add DEFAULT to Output Strings ---> ! <cfif ATTRIBUTES.alterSpec[i].defaultValue IS NOT ""> ! <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> ! ! <!--- ToDo: [AUTO_INCREMENT] [PRIMARY KEY] [reference_definition] ---> <!--- ToDo: [FIRST | AFTER column_name ]---> </cfif> |
From: <nan...@us...> - 2003-06-16 16:18:17
|
Update of /cvsroot/mydatabasepilot/MyDatabasePilot/Query In directory sc8-pr-cvs1:/tmp/cvs-serv13148/Query Modified Files: alterTable.cfm Log Message: Functionality Added: [ 755417 ] Added NULL | NOT NULL Index: alterTable.cfm =================================================================== RCS file: /cvsroot/mydatabasepilot/MyDatabasePilot/Query/alterTable.cfm,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** alterTable.cfm 16 Jun 2003 15:51:59 -0000 1.10 --- alterTable.cfm 16 Jun 2003 16:18:13 -0000 1.11 *************** *** 159,162 **** --- 159,173 ---- <!--- NO Specific Options (Only Generic like Is NULL) for TINYBLOB,BLOB,MEDIUMBLOB,LONGBLOB,TINYTEXT,TEXT,MEDIUMTEXT,LONGTEXT,DATE,TIME,DATETIME,YEAR,TIMESTAMP---> </cfswitch> + <!--- 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> + + <!--- ToDo: [DEFAULT default_value] [AUTO_INCREMENT] [PRIMARY KEY] [reference_definition] ---> + <!--- ToDo: [FIRST | AFTER column_name ]---> </cfif> </cfcase> |
From: <nan...@us...> - 2003-06-16 16:12:25
|
Update of /cvsroot/mydatabasepilot/MyDatabasePilot/dbProcessInit In directory sc8-pr-cvs1:/tmp/cvs-serv12404/dbProcessInit Modified Files: AddField.cfm Log Message: Functionality Added: [ 755413 ] Added Key "notNull" Index: AddField.cfm =================================================================== RCS file: /cvsroot/mydatabasepilot/MyDatabasePilot/dbProcessInit/AddField.cfm,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** AddField.cfm 16 Jun 2003 15:35:39 -0000 1.12 --- AddField.cfm 16 Jun 2003 16:12:22 -0000 1.13 *************** *** 60,63 **** --- 60,65 ---- <!--- 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> </cfloop> |
From: <nan...@us...> - 2003-06-16 15:52:03
|
Update of /cvsroot/mydatabasepilot/MyDatabasePilot/Query In directory sc8-pr-cvs1:/tmp/cvs-serv9418/Query Modified Files: alterTable.cfm Log Message: Functionality Added: [ 755404 ] Added Unsigned, Zerofill to Numeric Column Types Index: alterTable.cfm =================================================================== RCS file: /cvsroot/mydatabasepilot/MyDatabasePilot/Query/alterTable.cfm,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** alterTable.cfm 16 Jun 2003 15:10:16 -0000 1.9 --- alterTable.cfm 16 Jun 2003 15:51:59 -0000 1.10 *************** *** 103,109 **** <cfset htmlSQL = "#htmlSQL#(<span class=""Number"">#ATTRIBUTES.alterSpec[i].length#</span>)"> </cfif> ! <!--- TODO: ! [UNSIGNED] [ZEROFILL] ! ---> </cfcase> <cfcase value="REAL,FLOAT,DOUBLE"> --- 103,116 ---- <cfset htmlSQL = "#htmlSQL#(<span class=""Number"">#ATTRIBUTES.alterSpec[i].length#</span>)"> </cfif> ! <!--- Add Unsigned to Output Strings if Specified ---> ! <cfif ATTRIBUTES.alterSpec[i].unsigned> ! <cfset rawSQL = "#rawSQL# UNSIGNED"> ! <cfset htmlSQL = "#htmlSQL# <span class=""KeyWord"">UNSIGNED</span>"> ! </cfif> ! <!--- Add Zerofill to Output Strings if Specified ---> ! <cfif ATTRIBUTES.alterSpec[i].zerofill> ! <cfset rawSQL = "#rawSQL# ZEROFILL"> ! <cfset htmlSQL = "#htmlSQL# <span class=""KeyWord"">ZEROFILL</span>"> ! </cfif> </cfcase> <cfcase value="REAL,FLOAT,DOUBLE"> *************** *** 113,119 **** <cfset htmlSQL = "#htmlSQL#(<span class=""Number"">#ATTRIBUTES.alterSpec[i].length#</span>,<span class=""Number"">#ATTRIBUTES.alterSpec[i].numberOfDecimals#</span>)"> </cfif> ! <!--- TODO: ! [UNSIGNED] [ZEROFILL] ! ---> </cfcase> <cfcase value="DECIMAL,NUMERIC"> --- 120,133 ---- <cfset htmlSQL = "#htmlSQL#(<span class=""Number"">#ATTRIBUTES.alterSpec[i].length#</span>,<span class=""Number"">#ATTRIBUTES.alterSpec[i].numberOfDecimals#</span>)"> </cfif> ! <!--- Add Unsigned to Output Strings if Specified ---> ! <cfif ATTRIBUTES.alterSpec[i].unsigned> ! <cfset rawSQL = "#rawSQL# UNSIGNED"> ! <cfset htmlSQL = "#htmlSQL# <span class=""KeyWord"">UNSIGNED</span>"> ! </cfif> ! <!--- Add Zerofill to Output Strings if Specified ---> ! <cfif ATTRIBUTES.alterSpec[i].zerofill> ! <cfset rawSQL = "#rawSQL# ZEROFILL"> ! <cfset htmlSQL = "#htmlSQL# <span class=""KeyWord"">ZEROFILL</span>"> ! </cfif> </cfcase> <cfcase value="DECIMAL,NUMERIC"> *************** *** 132,139 **** <cfset htmlSQL = "#htmlSQL#(<span class=""Number"">#ATTRIBUTES.alterSpec[i].length#</span>,<span class=""Number"">#ATTRIBUTES.alterSpec[i].numberOfDecimals#</span>)"> </cfif> ! ! <!--- TODO: ! [UNSIGNED] [ZEROFILL] ! ---> </cfcase> <!--- NO Specific Options (Only Generic like Is NULL) for TINYBLOB,BLOB,MEDIUMBLOB,LONGBLOB,TINYTEXT,TEXT,MEDIUMTEXT,LONGTEXT,DATE,TIME,DATETIME,YEAR,TIMESTAMP---> --- 146,159 ---- <cfset htmlSQL = "#htmlSQL#(<span class=""Number"">#ATTRIBUTES.alterSpec[i].length#</span>,<span class=""Number"">#ATTRIBUTES.alterSpec[i].numberOfDecimals#</span>)"> </cfif> ! <!--- Add Unsigned to Output Strings if Specified ---> ! <cfif ATTRIBUTES.alterSpec[i].unsigned> ! <cfset rawSQL = "#rawSQL# UNSIGNED"> ! <cfset htmlSQL = "#htmlSQL# <span class=""KeyWord"">UNSIGNED</span>"> ! </cfif> ! <!--- Add Zerofill to Output Strings if Specified ---> ! <cfif ATTRIBUTES.alterSpec[i].zerofill> ! <cfset rawSQL = "#rawSQL# ZEROFILL"> ! <cfset htmlSQL = "#htmlSQL# <span class=""KeyWord"">ZEROFILL</span>"> ! </cfif> </cfcase> <!--- NO Specific Options (Only Generic like Is NULL) for TINYBLOB,BLOB,MEDIUMBLOB,LONGBLOB,TINYTEXT,TEXT,MEDIUMTEXT,LONGTEXT,DATE,TIME,DATETIME,YEAR,TIMESTAMP---> *************** *** 141,145 **** </cfif> </cfcase> ! <!--- ToDo Cases: ---> <cfcase value="ADD INDEX"></cfcase> <cfcase value="ADD PRIMARY KEY"></cfcase> --- 161,165 ---- </cfif> </cfcase> ! <!--- ToDo Cases: ---> <cfcase value="ADD INDEX"></cfcase> <cfcase value="ADD PRIMARY KEY"></cfcase> |
From: <nan...@us...> - 2003-06-16 15:35:42
|
Update of /cvsroot/mydatabasepilot/MyDatabasePilot/dbProcessInit In directory sc8-pr-cvs1:/tmp/cvs-serv6652/dbProcessInit Modified Files: AddField.cfm Log Message: Functionality Added: [ 755389 ] Added Keys "unsigned" and "zerofill" Index: AddField.cfm =================================================================== RCS file: /cvsroot/mydatabasepilot/MyDatabasePilot/dbProcessInit/AddField.cfm,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** AddField.cfm 16 Jun 2003 14:35:44 -0000 1.11 --- AddField.cfm 16 Jun 2003 15:35:39 -0000 1.12 *************** *** 56,61 **** <!--- Create Key "binary" ---> <cfif IsDefined("FORM.binary#i#")><cfset alterSpec[i].binary=TRUE /><cfelse><cfset alterSpec[i].binary=FALSE /></cfif> </cfloop> ! <!-------------------------------------------------> <!--- Invoke alterTable Custom Tag via CFModule ---> --- 56,65 ---- <!--- 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> </cfloop> ! <!-------------------------------------------------> <!--- Invoke alterTable Custom Tag via CFModule ---> |
From: <nan...@us...> - 2003-06-16 15:10:20
|
Update of /cvsroot/mydatabasepilot/MyDatabasePilot/Query In directory sc8-pr-cvs1:/tmp/cvs-serv3383/Query Modified Files: alterTable.cfm Log Message: Internal Structure Changed: Rearanged CFSWITCH Index: alterTable.cfm =================================================================== RCS file: /cvsroot/mydatabasepilot/MyDatabasePilot/Query/alterTable.cfm,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** alterTable.cfm 16 Jun 2003 14:35:44 -0000 1.8 --- alterTable.cfm 16 Jun 2003 15:10:16 -0000 1.9 *************** *** 91,110 **** </cfif> </cfcase> - <cfcase value="TINYBLOB,BLOB,MEDIUMBLOB,LONGBLOB,TINYTEXT,TEXT,MEDIUMTEXT,LONGTEXT"> - <!--- - TINYBLOB - BLOB - MEDIUMBLOB - LONGBLOB - TINYTEXT - TEXT - MEDIUMTEXT - LONGTEXT - ---> - </cfcase> <cfcase value="ENUM,SET"> ! <!--- ENUM(value1,value2,value3,...) ! SET(value1,value2,value3,...)</cfcase> ---> </cfcase> --- 91,98 ---- </cfif> </cfcase> <cfcase value="ENUM,SET"> ! <!--- TODO: ENUM(value1,value2,value3,...) ! SET(value1,value2,value3,...) ---> </cfcase> *************** *** 115,125 **** <cfset htmlSQL = "#htmlSQL#(<span class=""Number"">#ATTRIBUTES.alterSpec[i].length#</span>)"> </cfif> ! <!--- ! TINYINT[(length)] [UNSIGNED] [ZEROFILL] ! SMALLINT[(length)] [UNSIGNED] [ZEROFILL] ! MEDIUMINT[(length)] [UNSIGNED] [ZEROFILL] ! INT[(length)] [UNSIGNED] [ZEROFILL] ! INTEGER[(length)] [UNSIGNED] [ZEROFILL] ! BIGINT[(length)] [UNSIGNED] [ZEROFILL] ---> </cfcase> --- 103,108 ---- <cfset htmlSQL = "#htmlSQL#(<span class=""Number"">#ATTRIBUTES.alterSpec[i].length#</span>)"> </cfif> ! <!--- TODO: ! [UNSIGNED] [ZEROFILL] ---> </cfcase> *************** *** 130,137 **** <cfset htmlSQL = "#htmlSQL#(<span class=""Number"">#ATTRIBUTES.alterSpec[i].length#</span>,<span class=""Number"">#ATTRIBUTES.alterSpec[i].numberOfDecimals#</span>)"> </cfif> ! <!--- ! REAL[(length,decimals)] [UNSIGNED] [ZEROFILL] ! DOUBLE[(length,decimals)] [UNSIGNED] [ZEROFILL] ! FLOAT[(length,decimals)] [UNSIGNED] [ZEROFILL] ---> </cfcase> --- 113,118 ---- <cfset htmlSQL = "#htmlSQL#(<span class=""Number"">#ATTRIBUTES.alterSpec[i].length#</span>,<span class=""Number"">#ATTRIBUTES.alterSpec[i].numberOfDecimals#</span>)"> </cfif> ! <!--- TODO: ! [UNSIGNED] [ZEROFILL] ---> </cfcase> *************** *** 152,168 **** </cfif> ! <!--- ! DECIMAL(length,decimals) [UNSIGNED] [ZEROFILL] ! NUMERIC(length,decimals) [UNSIGNED] [ZEROFILL] ! ---> ! </cfcase> ! <cfcase value="DATE,TIME,DATETIME,YEAR,TIMESTAMP"> ! <!--- ! DATE ! TIME ! TIMESTAMP ! DATETIME ---> </cfcase> </cfswitch> </cfif> --- 133,141 ---- </cfif> ! <!--- TODO: ! [UNSIGNED] [ZEROFILL] ---> </cfcase> + <!--- NO Specific Options (Only Generic like Is NULL) for TINYBLOB,BLOB,MEDIUMBLOB,LONGBLOB,TINYTEXT,TEXT,MEDIUMTEXT,LONGTEXT,DATE,TIME,DATETIME,YEAR,TIMESTAMP---> </cfswitch> </cfif> |
From: <nan...@us...> - 2003-06-16 14:35:47
|
Update of /cvsroot/mydatabasepilot/MyDatabasePilot/dbProcessInit In directory sc8-pr-cvs1:/tmp/cvs-serv29780/dbProcessInit Modified Files: AddField.cfm Log Message: Functionality Added: [ 755353 ] Added BINARY to VARCHAR,CHAR field Types Index: AddField.cfm =================================================================== RCS file: /cvsroot/mydatabasepilot/MyDatabasePilot/dbProcessInit/AddField.cfm,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** AddField.cfm 16 Jun 2003 13:57:21 -0000 1.10 --- AddField.cfm 16 Jun 2003 14:35:44 -0000 1.11 *************** *** 55,59 **** <cfset alterSpec[i].defaultValue="#Evaluate("FORM.defaultValue#i#")#" /> <!--- Create Key "binary" ---> ! <cfif IsDefined("FORM.binary#i#")><cfset alterSpec[i].binary="TRUE" /><cfelse><cfset alterSpec[i].binary="FALSE" /></cfif> </cfloop> --- 55,59 ---- <cfset alterSpec[i].defaultValue="#Evaluate("FORM.defaultValue#i#")#" /> <!--- Create Key "binary" ---> ! <cfif IsDefined("FORM.binary#i#")><cfset alterSpec[i].binary=TRUE /><cfelse><cfset alterSpec[i].binary=FALSE /></cfif> </cfloop> |
From: <nan...@us...> - 2003-06-16 14:35:47
|
Update of /cvsroot/mydatabasepilot/MyDatabasePilot/Query In directory sc8-pr-cvs1:/tmp/cvs-serv29780/Query Modified Files: alterTable.cfm Log Message: Functionality Added: [ 755353 ] Added BINARY to VARCHAR,CHAR field Types Index: alterTable.cfm =================================================================== RCS file: /cvsroot/mydatabasepilot/MyDatabasePilot/Query/alterTable.cfm,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** alterTable.cfm 16 Jun 2003 04:31:48 -0000 1.7 --- alterTable.cfm 16 Jun 2003 14:35:44 -0000 1.8 *************** *** 1,304 **** ! <!---******************************************************************************************* ! * Copyright: MyDatabase Pilot is distributed under the terms of the GNU GPL license * ! * Template: Query/alterTable.cfm (Custom Tag) * ! * Purpose: - Executes and/or displays an ALTER TABLE command * ! * - In Start Mode, the alter table strings are generated and sent back to * ! * caller if requested * ! * - In End Mode, the Query is executed * ! * Inputs Required: - table String * ! * - execute Boolean * ! * - alterSpec Array of Structures * ! * Inputs Optional: - dataSource String * ! * - userName String * ! * - password String * ! * - sqlOutputType (RAW|HTML|BOTH) * ! * Outputs: - rawOutput String * ! * - htmlOutput String * ! * Other Requirements- This Custom Tag requires an end tag * ! ********************************************************************************************---> ! ! <!---||| Determine which execution mode this custom tag is in |||---> ! <cfswitch expression="#ThisTag.ExecutionMode#"> ! <!---||| If in start mode ... |||---> ! <cfcase value="start"> ! <!----------------------> ! <!--- Error Checking ---> ! <!----------------------> ! <!---||| Check for existence of Required Attributes |||---> ! <!--- This needs to be developed ---> ! ! <!---||| Check for proper data types, to ensure SQL syntax is correct |||---> ! <!--- This needs to be developed ---> ! ! <!--------------------------------------------> ! <!--- Generate ALTER TABLE Command Strings ---> ! <!--------------------------------------------> ! <!---||| Initialize Internal Variables |||---> ! <cfset rawSQL = "ALTER TABLE"> ! <cfset htmlSQL = "<span class=""KeyWord"">ALTER TABLE</span>"> ! ! <!---||| Table Name |||---> ! <cfset rawSQL = "#rawSQL# #ATTRIBUTES.table#"> ! <cfset htmlSQL = "#htmlSQL# <span class=""String"">#ATTRIBUTES.table#</span>"> ! ! <!---||| Alter Specifications |||---> ! <!--- Process each Alter Specification ----> ! <cfloop from="1" to="#arrayLen(ATTRIBUTES.alterSpec)#" index="i"> ! <!--- If this is not the first alter specification add a comma to the last alterSpec ---> ! <cfif i GT 1> ! <cfset rawSQL = "#rawSQL#,"> ! <cfset htmlSQL = "#htmlSQL#,"> ! </cfif> ! ! <!--- Determine the alterSpec format ---> ! <cfswitch expression="#ATTRIBUTES.alterSpec[i].format#"> ! <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> ! <cfset rawSQL = "#rawSQL# #ATTRIBUTES.alterSpec[i].colType#"> ! <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> ! <!--- ! CHAR(length) [BINARY] ! VARCHAR(length) [BINARY] ! ---> ! </cfcase> ! <cfcase value="TINYBLOB,BLOB,MEDIUMBLOB,LONGBLOB,TINYTEXT,TEXT,MEDIUMTEXT,LONGTEXT"> ! <!--- ! TINYBLOB ! BLOB ! MEDIUMBLOB ! LONGBLOB ! TINYTEXT ! TEXT ! MEDIUMTEXT ! LONGTEXT ! ---> ! </cfcase> ! <cfcase value="ENUM,SET"> ! <!--- ! ENUM(value1,value2,value3,...) ! SET(value1,value2,value3,...)</cfcase> ! ---> ! </cfcase> ! <cfcase value="TINYINT,SMALLINT,MEDIUMINT,INT,INTEGER,BIGINT"> ! <!--- 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> ! <!--- ! TINYINT[(length)] [UNSIGNED] [ZEROFILL] ! SMALLINT[(length)] [UNSIGNED] [ZEROFILL] ! MEDIUMINT[(length)] [UNSIGNED] [ZEROFILL] ! INT[(length)] [UNSIGNED] [ZEROFILL] ! INTEGER[(length)] [UNSIGNED] [ZEROFILL] ! BIGINT[(length)] [UNSIGNED] [ZEROFILL] ! ---> ! </cfcase> ! <cfcase value="REAL,FLOAT,DOUBLE"> ! <!--- 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> ! <!--- ! REAL[(length,decimals)] [UNSIGNED] [ZEROFILL] ! DOUBLE[(length,decimals)] [UNSIGNED] [ZEROFILL] ! FLOAT[(length,decimals)] [UNSIGNED] [ZEROFILL] ! ---> ! </cfcase> ! <cfcase value="DECIMAL,NUMERIC"> ! <!--- 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> ! ! <!--- ! DECIMAL(length,decimals) [UNSIGNED] [ZEROFILL] ! NUMERIC(length,decimals) [UNSIGNED] [ZEROFILL] ! ---> ! </cfcase> ! <cfcase value="DATE,TIME,DATETIME,YEAR,TIMESTAMP"> ! <!--- ! DATE ! TIME ! TIMESTAMP ! DATETIME ! ---> ! </cfcase> ! </cfswitch> ! </cfif> ! </cfcase> ! <!--- ToDo Cases: ---> ! <cfcase value="ADD INDEX"></cfcase> ! <cfcase value="ADD PRIMARY KEY"></cfcase> ! <cfcase value="ADD UNIQUE"></cfcase> ! <cfcase value="ADD FULLTEXT"></cfcase> ! <cfcase value="ADD FOREIGN KEY"></cfcase> ! <cfcase value="ALTER COLUMN"></cfcase> ! <cfcase value="CHANGE COLUMN"></cfcase> ! <cfcase value="MODIFY COLUMN"></cfcase> ! <cfcase value="DROP COLUMN"></cfcase> ! <cfcase value="DROP PRIMARY KEY"></cfcase> ! <cfcase value="DROP INDEX"></cfcase> ! <cfcase value="DISABLE KEYS"></cfcase> ! <cfcase value="ENABLE KEYS"></cfcase> ! <cfcase value="RENAME TO"></cfcase> ! <cfcase value="ORDER BY"></cfcase> ! <cfcase value="table_options"></cfcase> ! </cfswitch> ! </cfloop> ! ! <!---||| Terminate SQL Statement with Semicolon |||---> ! <cfset rawSQL = "#rawSQL#;"> ! <cfset htmlSQL = "#htmlSQL#;"> ! </cfcase> ! ! <!---||| If in end mode ... |||---> ! <cfcase value="end"> ! <!------------------> ! <!--- Output SQL ---> ! <!------------------> ! <!---||| If Output was requested... |||---> ! <cfif IsDefined("ATTRIBUTES.sqlOutputType")> ! <!---||| Return RAW SQL if Requested |||---> ! <cfif ATTRIBUTES.sqlOutputType IS "RAW" OR ATTRIBUTES.sqlOutputType IS "BOTH"> ! <cfset "CALLER.#ATTRIBUTES.rawOutput#" = rawSQL> ! </cfif> ! ! <!---||| Return HTML display friendly SQL if Requested |||---> ! <cfif ATTRIBUTES.sqlOutputType IS "HTML" OR ATTRIBUTES.sqlOutputType IS "BOTH"> ! <cfset "CALLER.#ATTRIBUTES.htmlOutput#" = htmlSQL> ! </cfif> ! </cfif> ! ! <!-----------------------------------> ! <!--- Execute ALTER TABLE Command ---> ! <!-----------------------------------> ! <!--- If Execution was requested ... ---> ! <cfif ATTRIBUTES.execute> ! <!---<cfquery name="#ATTRIBUTES.queryName#" datasource="#ATTRIBUTES.dataSource#" username="#ATTRIBUTES.userName#" password="#ATTRIBUTES.password#"> ! <!--- Execute Generated rawSQL ---> ! #rawSQL# ! </cfquery>---> ! </cfif> ! </cfcase> ! </cfswitch> ! ! <!---+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ! === MySQL CREATE TABLE Syntax === ! ! ALTER [IGNORE] TABLE tbl_name alter_spec [, alter_spec ...] ! ! alter_specification: ! ADD [COLUMN] create_definition [FIRST | AFTER column_name ] ! or ADD [COLUMN] (create_definition, create_definition,...) ! or ADD INDEX [index_name] (index_col_name,...) ! or ADD PRIMARY KEY (index_col_name,...) ! or ADD UNIQUE [index_name] (index_col_name,...) ! or ADD FULLTEXT [index_name] (index_col_name,...) ! or ADD [CONSTRAINT symbol] FOREIGN KEY [index_name] (index_col_name,...) ! [reference_definition] ! or ALTER [COLUMN] col_name {SET DEFAULT literal | DROP DEFAULT} ! or CHANGE [COLUMN] old_col_name create_definition ! [FIRST | AFTER column_name] ! or MODIFY [COLUMN] create_definition [FIRST | AFTER column_name] ! or DROP [COLUMN] col_name ! or DROP PRIMARY KEY ! or DROP INDEX index_name ! or DISABLE KEYS ! or ENABLE KEYS ! or RENAME [TO] new_tbl_name ! or ORDER BY col ! or table_options ! ! create_definition: ! col_name type [NOT NULL | NULL] [DEFAULT default_value] [AUTO_INCREMENT] ! [PRIMARY KEY] [reference_definition] ! or PRIMARY KEY (index_col_name,...) ! or KEY [index_name] (index_col_name,...) ! or INDEX [index_name] (index_col_name,...) ! or UNIQUE [INDEX] [index_name] (index_col_name,...) ! or FULLTEXT [INDEX] [index_name] (index_col_name,...) ! or [CONSTRAINT symbol] FOREIGN KEY [index_name] (index_col_name,...) ! [reference_definition] ! or CHECK (expr) ! ! type: ! TINYINT[(length)] [UNSIGNED] [ZEROFILL] ! or SMALLINT[(length)] [UNSIGNED] [ZEROFILL] ! or MEDIUMINT[(length)] [UNSIGNED] [ZEROFILL] ! or INT[(length)] [UNSIGNED] [ZEROFILL] ! or INTEGER[(length)] [UNSIGNED] [ZEROFILL] ! or BIGINT[(length)] [UNSIGNED] [ZEROFILL] ! or REAL[(length,decimals)] [UNSIGNED] [ZEROFILL] ! or DOUBLE[(length,decimals)] [UNSIGNED] [ZEROFILL] ! or FLOAT[(length,decimals)] [UNSIGNED] [ZEROFILL] ! or DECIMAL(length,decimals) [UNSIGNED] [ZEROFILL] ! or NUMERIC(length,decimals) [UNSIGNED] [ZEROFILL] ! or CHAR(length) [BINARY] ! or VARCHAR(length) [BINARY] ! or DATE ! or TIME ! or TIMESTAMP ! or DATETIME ! or TINYBLOB ! or BLOB ! or MEDIUMBLOB ! or LONGBLOB ! or TINYTEXT ! or TEXT ! or MEDIUMTEXT ! or LONGTEXT ! or ENUM(value1,value2,value3,...) ! or SET(value1,value2,value3,...) ! ! index_col_name: ! col_name [(length)] ! ! reference_definition: ! REFERENCES tbl_name [(index_col_name,...)] ! [MATCH FULL | MATCH PARTIAL] ! [ON DELETE reference_option] ! [ON UPDATE reference_option] ! ! reference_option: ! RESTRICT | CASCADE | SET NULL | NO ACTION | SET DEFAULT +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---> --- 1,305 ---- ! <!---******************************************************************************************* ! * Copyright: MyDatabase Pilot is distributed under the terms of the GNU GPL license * ! * Template: Query/alterTable.cfm (Custom Tag) * ! * Purpose: - Executes and/or displays an ALTER TABLE command * ! * - In Start Mode, the alter table strings are generated and sent back to * ! * caller if requested * ! * - In End Mode, the Query is executed * ! * Inputs Required: - table String * ! * - execute Boolean * ! * - alterSpec Array of Structures * ! * Inputs Optional: - dataSource String * ! * - userName String * ! * - password String * ! * - sqlOutputType (RAW|HTML|BOTH) * ! * Outputs: - rawOutput String * ! * - htmlOutput String * ! * Other Requirements- This Custom Tag requires an end tag * ! ********************************************************************************************---> ! ! <!---||| Determine which execution mode this custom tag is in |||---> ! <cfswitch expression="#ThisTag.ExecutionMode#"> ! <!---||| If in start mode ... |||---> ! <cfcase value="start"> ! <!----------------------> ! <!--- Error Checking ---> ! <!----------------------> ! <!---||| Check for existence of Required Attributes |||---> ! <!--- This needs to be developed ---> ! ! <!---||| Check for proper data types, to ensure SQL syntax is correct |||---> ! <!--- This needs to be developed ---> ! ! <!--------------------------------------------> ! <!--- Generate ALTER TABLE Command Strings ---> ! <!--------------------------------------------> ! <!---||| Initialize Internal Variables |||---> ! <cfset rawSQL = "ALTER TABLE"> ! <cfset htmlSQL = "<span class=""KeyWord"">ALTER TABLE</span>"> ! ! <!---||| Table Name |||---> ! <cfset rawSQL = "#rawSQL# #ATTRIBUTES.table#"> ! <cfset htmlSQL = "#htmlSQL# <span class=""String"">#ATTRIBUTES.table#</span>"> ! ! <!---||| Alter Specifications |||---> ! <!--- Process each Alter Specification ----> ! <cfloop from="1" to="#arrayLen(ATTRIBUTES.alterSpec)#" index="i"> ! <!--- If this is not the first alter specification add a comma to the last alterSpec ---> ! <cfif i GT 1> ! <cfset rawSQL = "#rawSQL#,"> ! <cfset htmlSQL = "#htmlSQL#,"> ! </cfif> ! ! <!--- Determine the alterSpec format ---> ! <cfswitch expression="#ATTRIBUTES.alterSpec[i].format#"> ! <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> ! <cfset rawSQL = "#rawSQL# #ATTRIBUTES.alterSpec[i].colType#"> ! <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="TINYBLOB,BLOB,MEDIUMBLOB,LONGBLOB,TINYTEXT,TEXT,MEDIUMTEXT,LONGTEXT"> ! <!--- ! TINYBLOB ! BLOB ! MEDIUMBLOB ! LONGBLOB ! TINYTEXT ! TEXT ! MEDIUMTEXT ! LONGTEXT ! ---> ! </cfcase> ! <cfcase value="ENUM,SET"> ! <!--- ! ENUM(value1,value2,value3,...) ! SET(value1,value2,value3,...)</cfcase> ! ---> ! </cfcase> ! <cfcase value="TINYINT,SMALLINT,MEDIUMINT,INT,INTEGER,BIGINT"> ! <!--- 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> ! <!--- ! TINYINT[(length)] [UNSIGNED] [ZEROFILL] ! SMALLINT[(length)] [UNSIGNED] [ZEROFILL] ! MEDIUMINT[(length)] [UNSIGNED] [ZEROFILL] ! INT[(length)] [UNSIGNED] [ZEROFILL] ! INTEGER[(length)] [UNSIGNED] [ZEROFILL] ! BIGINT[(length)] [UNSIGNED] [ZEROFILL] ! ---> ! </cfcase> ! <cfcase value="REAL,FLOAT,DOUBLE"> ! <!--- 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> ! <!--- ! REAL[(length,decimals)] [UNSIGNED] [ZEROFILL] ! DOUBLE[(length,decimals)] [UNSIGNED] [ZEROFILL] ! FLOAT[(length,decimals)] [UNSIGNED] [ZEROFILL] ! ---> ! </cfcase> ! <cfcase value="DECIMAL,NUMERIC"> ! <!--- 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> ! ! <!--- ! DECIMAL(length,decimals) [UNSIGNED] [ZEROFILL] ! NUMERIC(length,decimals) [UNSIGNED] [ZEROFILL] ! ---> ! </cfcase> ! <cfcase value="DATE,TIME,DATETIME,YEAR,TIMESTAMP"> ! <!--- ! DATE ! TIME ! TIMESTAMP ! DATETIME ! ---> ! </cfcase> ! </cfswitch> ! </cfif> ! </cfcase> ! <!--- ToDo Cases: ---> ! <cfcase value="ADD INDEX"></cfcase> ! <cfcase value="ADD PRIMARY KEY"></cfcase> ! <cfcase value="ADD UNIQUE"></cfcase> ! <cfcase value="ADD FULLTEXT"></cfcase> ! <cfcase value="ADD FOREIGN KEY"></cfcase> ! <cfcase value="ALTER COLUMN"></cfcase> ! <cfcase value="CHANGE COLUMN"></cfcase> ! <cfcase value="MODIFY COLUMN"></cfcase> ! <cfcase value="DROP COLUMN"></cfcase> ! <cfcase value="DROP PRIMARY KEY"></cfcase> ! <cfcase value="DROP INDEX"></cfcase> ! <cfcase value="DISABLE KEYS"></cfcase> ! <cfcase value="ENABLE KEYS"></cfcase> ! <cfcase value="RENAME TO"></cfcase> ! <cfcase value="ORDER BY"></cfcase> ! <cfcase value="table_options"></cfcase> ! </cfswitch> ! </cfloop> ! ! <!---||| Terminate SQL Statement with Semicolon |||---> ! <cfset rawSQL = "#rawSQL#;"> ! <cfset htmlSQL = "#htmlSQL#;"> ! </cfcase> ! ! <!---||| If in end mode ... |||---> ! <cfcase value="end"> ! <!------------------> ! <!--- Output SQL ---> ! <!------------------> ! <!---||| If Output was requested... |||---> ! <cfif IsDefined("ATTRIBUTES.sqlOutputType")> ! <!---||| Return RAW SQL if Requested |||---> ! <cfif ATTRIBUTES.sqlOutputType IS "RAW" OR ATTRIBUTES.sqlOutputType IS "BOTH"> ! <cfset "CALLER.#ATTRIBUTES.rawOutput#" = rawSQL> ! </cfif> ! ! <!---||| Return HTML display friendly SQL if Requested |||---> ! <cfif ATTRIBUTES.sqlOutputType IS "HTML" OR ATTRIBUTES.sqlOutputType IS "BOTH"> ! <cfset "CALLER.#ATTRIBUTES.htmlOutput#" = htmlSQL> ! </cfif> ! </cfif> ! ! <!-----------------------------------> ! <!--- Execute ALTER TABLE Command ---> ! <!-----------------------------------> ! <!--- If Execution was requested ... ---> ! <cfif ATTRIBUTES.execute> ! <!---<cfquery name="#ATTRIBUTES.queryName#" datasource="#ATTRIBUTES.dataSource#" username="#ATTRIBUTES.userName#" password="#ATTRIBUTES.password#"> ! <!--- Execute Generated rawSQL ---> ! #rawSQL# ! </cfquery>---> ! </cfif> ! </cfcase> ! </cfswitch> ! ! <!---+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ! === MySQL CREATE TABLE Syntax === ! ! ALTER [IGNORE] TABLE tbl_name alter_spec [, alter_spec ...] ! ! alter_specification: ! ADD [COLUMN] create_definition [FIRST | AFTER column_name ] ! or ADD [COLUMN] (create_definition, create_definition,...) ! or ADD INDEX [index_name] (index_col_name,...) ! or ADD PRIMARY KEY (index_col_name,...) ! or ADD UNIQUE [index_name] (index_col_name,...) ! or ADD FULLTEXT [index_name] (index_col_name,...) ! or ADD [CONSTRAINT symbol] FOREIGN KEY [index_name] (index_col_name,...) ! [reference_definition] ! or ALTER [COLUMN] col_name {SET DEFAULT literal | DROP DEFAULT} ! or CHANGE [COLUMN] old_col_name create_definition ! [FIRST | AFTER column_name] ! or MODIFY [COLUMN] create_definition [FIRST | AFTER column_name] ! or DROP [COLUMN] col_name ! or DROP PRIMARY KEY ! or DROP INDEX index_name ! or DISABLE KEYS ! or ENABLE KEYS ! or RENAME [TO] new_tbl_name ! or ORDER BY col ! or table_options ! ! create_definition: ! col_name type [NOT NULL | NULL] [DEFAULT default_value] [AUTO_INCREMENT] ! [PRIMARY KEY] [reference_definition] ! or PRIMARY KEY (index_col_name,...) ! or KEY [index_name] (index_col_name,...) ! or INDEX [index_name] (index_col_name,...) ! or UNIQUE [INDEX] [index_name] (index_col_name,...) ! or FULLTEXT [INDEX] [index_name] (index_col_name,...) ! or [CONSTRAINT symbol] FOREIGN KEY [index_name] (index_col_name,...) ! [reference_definition] ! or CHECK (expr) ! ! type: ! TINYINT[(length)] [UNSIGNED] [ZEROFILL] ! or SMALLINT[(length)] [UNSIGNED] [ZEROFILL] ! or MEDIUMINT[(length)] [UNSIGNED] [ZEROFILL] ! or INT[(length)] [UNSIGNED] [ZEROFILL] ! or INTEGER[(length)] [UNSIGNED] [ZEROFILL] ! or BIGINT[(length)] [UNSIGNED] [ZEROFILL] ! or REAL[(length,decimals)] [UNSIGNED] [ZEROFILL] ! or DOUBLE[(length,decimals)] [UNSIGNED] [ZEROFILL] ! or FLOAT[(length,decimals)] [UNSIGNED] [ZEROFILL] ! or DECIMAL(length,decimals) [UNSIGNED] [ZEROFILL] ! or NUMERIC(length,decimals) [UNSIGNED] [ZEROFILL] ! or CHAR(length) [BINARY] ! or VARCHAR(length) [BINARY] ! or DATE ! or TIME ! or TIMESTAMP ! or DATETIME ! or TINYBLOB ! or BLOB ! or MEDIUMBLOB ! or LONGBLOB ! or TINYTEXT ! or TEXT ! or MEDIUMTEXT ! or LONGTEXT ! or ENUM(value1,value2,value3,...) ! or SET(value1,value2,value3,...) ! ! index_col_name: ! col_name [(length)] ! ! reference_definition: ! REFERENCES tbl_name [(index_col_name,...)] ! [MATCH FULL | MATCH PARTIAL] ! [ON DELETE reference_option] ! [ON UPDATE reference_option] ! ! reference_option: ! RESTRICT | CASCADE | SET NULL | NO ACTION | SET DEFAULT +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---> |
From: <nan...@us...> - 2003-06-16 13:57:25
|
Update of /cvsroot/mydatabasepilot/MyDatabasePilot/dbProcessInit In directory sc8-pr-cvs1:/tmp/cvs-serv23343/dbProcessInit Modified Files: AddField.cfm Log Message: Functionality Added: [ 755322 ] Added Key "binary" - alterSpec[i].binary Index: AddField.cfm =================================================================== RCS file: /cvsroot/mydatabasepilot/MyDatabasePilot/dbProcessInit/AddField.cfm,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** AddField.cfm 13 Jun 2003 18:55:45 -0000 1.9 --- AddField.cfm 16 Jun 2003 13:57:21 -0000 1.10 *************** *** 54,57 **** --- 54,59 ---- <!--- Create Key "defaultValue" ---> <cfset alterSpec[i].defaultValue="#Evaluate("FORM.defaultValue#i#")#" /> + <!--- Create Key "binary" ---> + <cfif IsDefined("FORM.binary#i#")><cfset alterSpec[i].binary="TRUE" /><cfelse><cfset alterSpec[i].binary="FALSE" /></cfif> </cfloop> |
From: <nan...@us...> - 2003-06-16 04:31:51
|
Update of /cvsroot/mydatabasepilot/MyDatabasePilot/Query In directory sc8-pr-cvs1:/tmp/cvs-serv14109/Query Modified Files: alterTable.cfm Log Message: Functionality Added: [ 755118 ] Added Length to CHAR, and VARCHAR field Types Index: alterTable.cfm =================================================================== RCS file: /cvsroot/mydatabasepilot/MyDatabasePilot/Query/alterTable.cfm,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** alterTable.cfm 13 Jun 2003 21:17:24 -0000 1.6 --- alterTable.cfm 16 Jun 2003 04:31:48 -0000 1.7 *************** *** 1,286 **** ! <!---******************************************************************************************* ! * Copyright: MyDatabase Pilot is distributed under the terms of the GNU GPL license * ! * Template: Query/alterTable.cfm (Custom Tag) * ! * Purpose: - Executes and/or displays an ALTER TABLE command * ! * - In Start Mode, the alter table strings are generated and sent back to * ! * caller if requested * ! * - In End Mode, the Query is executed * ! * Inputs Required: - table String * ! * - execute Boolean * ! * - alterSpec Array of Structures * ! * Inputs Optional: - dataSource String * ! * - userName String * ! * - password String * ! * - sqlOutputType (RAW|HTML|BOTH) * ! * Outputs: - rawOutput String * ! * - htmlOutput String * ! * Other Requirements- This Custom Tag requires an end tag * ! ********************************************************************************************---> ! ! <!---||| Determine which execution mode this custom tag is in |||---> ! <cfswitch expression="#ThisTag.ExecutionMode#"> ! <!---||| If in start mode ... |||---> ! <cfcase value="start"> ! <!----------------------> ! <!--- Error Checking ---> ! <!----------------------> ! <!---||| Check for existence of Required Attributes |||---> ! <!--- This needs to be developed ---> ! ! <!---||| Check for proper data types, to ensure SQL syntax is correct |||---> ! <!--- This needs to be developed ---> ! ! <!--------------------------------------------> ! <!--- Generate ALTER TABLE Command Strings ---> ! <!--------------------------------------------> ! <!---||| Initialize Internal Variables |||---> ! <cfset rawSQL = "ALTER TABLE"> ! <cfset htmlSQL = "<span class=""KeyWord"">ALTER TABLE</span>"> ! ! <!---||| Table Name |||---> ! <cfset rawSQL = "#rawSQL# #ATTRIBUTES.table#"> ! <cfset htmlSQL = "#htmlSQL# <span class=""String"">#ATTRIBUTES.table#</span>"> ! ! <!---||| Alter Specifications |||---> ! <!--- Process each Alter Specification ----> ! <cfloop from="1" to="#arrayLen(ATTRIBUTES.alterSpec)#" index="i"> ! <!--- If this is not the first alter specification add a comma to the last alterSpec ---> ! <cfif i GT 1> ! <cfset rawSQL = "#rawSQL#,"> ! <cfset htmlSQL = "#htmlSQL#,"> ! </cfif> ! ! <!--- Determine the alterSpec format ---> ! <cfswitch expression="#ATTRIBUTES.alterSpec[i].format#"> ! <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> ! <cfset rawSQL = "#rawSQL# #ATTRIBUTES.alterSpec[i].colType#"> ! <cfset htmlSQL = "#htmlSQL# <span class=""KeyWord"">#ATTRIBUTES.alterSpec[i].colType#</span>"> ! <!--- Type Options ---> ! <cfswitch expression="#ATTRIBUTES.alterSpec[i].colType#"> ! <cfcase value="VARCHAR,CHAR"></cfcase> ! <cfcase value="TINYBLOB,BLOB,MEDIUMBLOB,LONGBLOB,TINYTEXT,TEXT,MEDIUMTEXT,LONGTEXT"></cfcase> ! <cfcase value="ENUM,SET"></cfcase> ! <cfcase value="TINYINT,SMALLINT,MEDIUMINT,INT,INTEGER,BIGINT"> ! <!--- 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> ! <!--- ! TINYINT[(length)] [UNSIGNED] [ZEROFILL] ! SMALLINT[(length)] [UNSIGNED] [ZEROFILL] ! MEDIUMINT[(length)] [UNSIGNED] [ZEROFILL] ! INT[(length)] [UNSIGNED] [ZEROFILL] ! INTEGER[(length)] [UNSIGNED] [ZEROFILL] ! BIGINT[(length)] [UNSIGNED] [ZEROFILL] ! ---> ! </cfcase> ! <cfcase value="REAL,FLOAT,DOUBLE"> ! <!--- 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> ! <!--- ! REAL[(length,decimals)] [UNSIGNED] [ZEROFILL] ! DOUBLE[(length,decimals)] [UNSIGNED] [ZEROFILL] ! FLOAT[(length,decimals)] [UNSIGNED] [ZEROFILL] ! ---> ! </cfcase> ! <cfcase value="DECIMAL,NUMERIC"> ! <!--- 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> ! ! <!--- ! DECIMAL(length,decimals) [UNSIGNED] [ZEROFILL] ! NUMERIC(length,decimals) [UNSIGNED] [ZEROFILL] ! ---> ! </cfcase> ! <cfcase value="DATE,TIME,DATETIME,YEAR,TIMESTAMP"></cfcase> ! <!--- ! or CHAR(length) [BINARY] ! or VARCHAR(length) [BINARY] ! or DATE ! or TIME ! or TIMESTAMP ! or DATETIME ! or TINYBLOB ! or BLOB ! or MEDIUMBLOB ! or LONGBLOB ! or TINYTEXT ! or TEXT ! or MEDIUMTEXT ! or LONGTEXT ! or ENUM(value1,value2,value3,...) ! or SET(value1,value2,value3,...) ! ---> ! </cfswitch> ! </cfif> ! </cfcase> ! <!--- ToDo Cases: ---> ! <cfcase value="ADD INDEX"></cfcase> ! <cfcase value="ADD PRIMARY KEY"></cfcase> ! <cfcase value="ADD UNIQUE"></cfcase> ! <cfcase value="ADD FULLTEXT"></cfcase> ! <cfcase value="ADD FOREIGN KEY"></cfcase> ! <cfcase value="ALTER COLUMN"></cfcase> ! <cfcase value="CHANGE COLUMN"></cfcase> ! <cfcase value="MODIFY COLUMN"></cfcase> ! <cfcase value="DROP COLUMN"></cfcase> ! <cfcase value="DROP PRIMARY KEY"></cfcase> ! <cfcase value="DROP INDEX"></cfcase> ! <cfcase value="DISABLE KEYS"></cfcase> ! <cfcase value="ENABLE KEYS"></cfcase> ! <cfcase value="RENAME TO"></cfcase> ! <cfcase value="ORDER BY"></cfcase> ! <cfcase value="table_options"></cfcase> ! </cfswitch> ! </cfloop> ! ! <!---||| Terminate SQL Statement with Semicolon |||---> ! <cfset rawSQL = "#rawSQL#;"> ! <cfset htmlSQL = "#htmlSQL#;"> ! </cfcase> ! ! <!---||| If in end mode ... |||---> ! <cfcase value="end"> ! <!------------------> ! <!--- Output SQL ---> ! <!------------------> ! <!---||| If Output was requested... |||---> ! <cfif IsDefined("ATTRIBUTES.sqlOutputType")> ! <!---||| Return RAW SQL if Requested |||---> ! <cfif ATTRIBUTES.sqlOutputType IS "RAW" OR ATTRIBUTES.sqlOutputType IS "BOTH"> ! <cfset "CALLER.#ATTRIBUTES.rawOutput#" = rawSQL> ! </cfif> ! ! <!---||| Return HTML display friendly SQL if Requested |||---> ! <cfif ATTRIBUTES.sqlOutputType IS "HTML" OR ATTRIBUTES.sqlOutputType IS "BOTH"> ! <cfset "CALLER.#ATTRIBUTES.htmlOutput#" = htmlSQL> ! </cfif> ! </cfif> ! ! <!-----------------------------------> ! <!--- Execute ALTER TABLE Command ---> ! <!-----------------------------------> ! <!--- If Execution was requested ... ---> ! <cfif ATTRIBUTES.execute> ! <!---<cfquery name="#ATTRIBUTES.queryName#" datasource="#ATTRIBUTES.dataSource#" username="#ATTRIBUTES.userName#" password="#ATTRIBUTES.password#"> ! <!--- Execute Generated rawSQL ---> ! #rawSQL# ! </cfquery>---> ! </cfif> ! </cfcase> ! </cfswitch> ! ! <!---+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ! === MySQL CREATE TABLE Syntax === ! ! ALTER [IGNORE] TABLE tbl_name alter_spec [, alter_spec ...] ! ! alter_specification: ! ADD [COLUMN] create_definition [FIRST | AFTER column_name ] ! or ADD [COLUMN] (create_definition, create_definition,...) ! or ADD INDEX [index_name] (index_col_name,...) ! or ADD PRIMARY KEY (index_col_name,...) ! or ADD UNIQUE [index_name] (index_col_name,...) ! or ADD FULLTEXT [index_name] (index_col_name,...) ! or ADD [CONSTRAINT symbol] FOREIGN KEY [index_name] (index_col_name,...) ! [reference_definition] ! or ALTER [COLUMN] col_name {SET DEFAULT literal | DROP DEFAULT} ! or CHANGE [COLUMN] old_col_name create_definition ! [FIRST | AFTER column_name] ! or MODIFY [COLUMN] create_definition [FIRST | AFTER column_name] ! or DROP [COLUMN] col_name ! or DROP PRIMARY KEY ! or DROP INDEX index_name ! or DISABLE KEYS ! or ENABLE KEYS ! or RENAME [TO] new_tbl_name ! or ORDER BY col ! or table_options ! ! create_definition: ! col_name type [NOT NULL | NULL] [DEFAULT default_value] [AUTO_INCREMENT] ! [PRIMARY KEY] [reference_definition] ! or PRIMARY KEY (index_col_name,...) ! or KEY [index_name] (index_col_name,...) ! or INDEX [index_name] (index_col_name,...) ! or UNIQUE [INDEX] [index_name] (index_col_name,...) ! or FULLTEXT [INDEX] [index_name] (index_col_name,...) ! or [CONSTRAINT symbol] FOREIGN KEY [index_name] (index_col_name,...) ! [reference_definition] ! or CHECK (expr) ! ! type: ! TINYINT[(length)] [UNSIGNED] [ZEROFILL] ! or SMALLINT[(length)] [UNSIGNED] [ZEROFILL] ! or MEDIUMINT[(length)] [UNSIGNED] [ZEROFILL] ! or INT[(length)] [UNSIGNED] [ZEROFILL] ! or INTEGER[(length)] [UNSIGNED] [ZEROFILL] ! or BIGINT[(length)] [UNSIGNED] [ZEROFILL] ! or REAL[(length,decimals)] [UNSIGNED] [ZEROFILL] ! or DOUBLE[(length,decimals)] [UNSIGNED] [ZEROFILL] ! or FLOAT[(length,decimals)] [UNSIGNED] [ZEROFILL] ! or DECIMAL(length,decimals) [UNSIGNED] [ZEROFILL] ! or NUMERIC(length,decimals) [UNSIGNED] [ZEROFILL] ! or CHAR(length) [BINARY] ! or VARCHAR(length) [BINARY] ! or DATE ! or TIME ! or TIMESTAMP ! or DATETIME ! or TINYBLOB ! or BLOB ! or MEDIUMBLOB ! or LONGBLOB ! or TINYTEXT ! or TEXT ! or MEDIUMTEXT ! or LONGTEXT ! or ENUM(value1,value2,value3,...) ! or SET(value1,value2,value3,...) ! ! index_col_name: ! col_name [(length)] ! ! reference_definition: ! REFERENCES tbl_name [(index_col_name,...)] ! [MATCH FULL | MATCH PARTIAL] ! [ON DELETE reference_option] ! [ON UPDATE reference_option] ! ! reference_option: ! RESTRICT | CASCADE | SET NULL | NO ACTION | SET DEFAULT +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---> --- 1,304 ---- ! <!---******************************************************************************************* ! * Copyright: MyDatabase Pilot is distributed under the terms of the GNU GPL license * ! * Template: Query/alterTable.cfm (Custom Tag) * ! * Purpose: - Executes and/or displays an ALTER TABLE command * ! * - In Start Mode, the alter table strings are generated and sent back to * ! * caller if requested * ! * - In End Mode, the Query is executed * ! * Inputs Required: - table String * ! * - execute Boolean * ! * - alterSpec Array of Structures * ! * Inputs Optional: - dataSource String * ! * - userName String * ! * - password String * ! * - sqlOutputType (RAW|HTML|BOTH) * ! * Outputs: - rawOutput String * ! * - htmlOutput String * ! * Other Requirements- This Custom Tag requires an end tag * ! ********************************************************************************************---> ! ! <!---||| Determine which execution mode this custom tag is in |||---> ! <cfswitch expression="#ThisTag.ExecutionMode#"> ! <!---||| If in start mode ... |||---> ! <cfcase value="start"> ! <!----------------------> ! <!--- Error Checking ---> ! <!----------------------> ! <!---||| Check for existence of Required Attributes |||---> ! <!--- This needs to be developed ---> ! ! <!---||| Check for proper data types, to ensure SQL syntax is correct |||---> ! <!--- This needs to be developed ---> ! ! <!--------------------------------------------> ! <!--- Generate ALTER TABLE Command Strings ---> ! <!--------------------------------------------> ! <!---||| Initialize Internal Variables |||---> ! <cfset rawSQL = "ALTER TABLE"> ! <cfset htmlSQL = "<span class=""KeyWord"">ALTER TABLE</span>"> ! ! <!---||| Table Name |||---> ! <cfset rawSQL = "#rawSQL# #ATTRIBUTES.table#"> ! <cfset htmlSQL = "#htmlSQL# <span class=""String"">#ATTRIBUTES.table#</span>"> ! ! <!---||| Alter Specifications |||---> ! <!--- Process each Alter Specification ----> ! <cfloop from="1" to="#arrayLen(ATTRIBUTES.alterSpec)#" index="i"> ! <!--- If this is not the first alter specification add a comma to the last alterSpec ---> ! <cfif i GT 1> ! <cfset rawSQL = "#rawSQL#,"> ! <cfset htmlSQL = "#htmlSQL#,"> ! </cfif> ! ! <!--- Determine the alterSpec format ---> ! <cfswitch expression="#ATTRIBUTES.alterSpec[i].format#"> ! <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> ! <cfset rawSQL = "#rawSQL# #ATTRIBUTES.alterSpec[i].colType#"> ! <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> ! <!--- ! CHAR(length) [BINARY] ! VARCHAR(length) [BINARY] ! ---> ! </cfcase> ! <cfcase value="TINYBLOB,BLOB,MEDIUMBLOB,LONGBLOB,TINYTEXT,TEXT,MEDIUMTEXT,LONGTEXT"> ! <!--- ! TINYBLOB ! BLOB ! MEDIUMBLOB ! LONGBLOB ! TINYTEXT ! TEXT ! MEDIUMTEXT ! LONGTEXT ! ---> ! </cfcase> ! <cfcase value="ENUM,SET"> ! <!--- ! ENUM(value1,value2,value3,...) ! SET(value1,value2,value3,...)</cfcase> ! ---> ! </cfcase> ! <cfcase value="TINYINT,SMALLINT,MEDIUMINT,INT,INTEGER,BIGINT"> ! <!--- 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> ! <!--- ! TINYINT[(length)] [UNSIGNED] [ZEROFILL] ! SMALLINT[(length)] [UNSIGNED] [ZEROFILL] ! MEDIUMINT[(length)] [UNSIGNED] [ZEROFILL] ! INT[(length)] [UNSIGNED] [ZEROFILL] ! INTEGER[(length)] [UNSIGNED] [ZEROFILL] ! BIGINT[(length)] [UNSIGNED] [ZEROFILL] ! ---> ! </cfcase> ! <cfcase value="REAL,FLOAT,DOUBLE"> ! <!--- 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> ! <!--- ! REAL[(length,decimals)] [UNSIGNED] [ZEROFILL] ! DOUBLE[(length,decimals)] [UNSIGNED] [ZEROFILL] ! FLOAT[(length,decimals)] [UNSIGNED] [ZEROFILL] ! ---> ! </cfcase> ! <cfcase value="DECIMAL,NUMERIC"> ! <!--- 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> ! ! <!--- ! DECIMAL(length,decimals) [UNSIGNED] [ZEROFILL] ! NUMERIC(length,decimals) [UNSIGNED] [ZEROFILL] ! ---> ! </cfcase> ! <cfcase value="DATE,TIME,DATETIME,YEAR,TIMESTAMP"> ! <!--- ! DATE ! TIME ! TIMESTAMP ! DATETIME ! ---> ! </cfcase> ! </cfswitch> ! </cfif> ! </cfcase> ! <!--- ToDo Cases: ---> ! <cfcase value="ADD INDEX"></cfcase> ! <cfcase value="ADD PRIMARY KEY"></cfcase> ! <cfcase value="ADD UNIQUE"></cfcase> ! <cfcase value="ADD FULLTEXT"></cfcase> ! <cfcase value="ADD FOREIGN KEY"></cfcase> ! <cfcase value="ALTER COLUMN"></cfcase> ! <cfcase value="CHANGE COLUMN"></cfcase> ! <cfcase value="MODIFY COLUMN"></cfcase> ! <cfcase value="DROP COLUMN"></cfcase> ! <cfcase value="DROP PRIMARY KEY"></cfcase> ! <cfcase value="DROP INDEX"></cfcase> ! <cfcase value="DISABLE KEYS"></cfcase> ! <cfcase value="ENABLE KEYS"></cfcase> ! <cfcase value="RENAME TO"></cfcase> ! <cfcase value="ORDER BY"></cfcase> ! <cfcase value="table_options"></cfcase> ! </cfswitch> ! </cfloop> ! ! <!---||| Terminate SQL Statement with Semicolon |||---> ! <cfset rawSQL = "#rawSQL#;"> ! <cfset htmlSQL = "#htmlSQL#;"> ! </cfcase> ! ! <!---||| If in end mode ... |||---> ! <cfcase value="end"> ! <!------------------> ! <!--- Output SQL ---> ! <!------------------> ! <!---||| If Output was requested... |||---> ! <cfif IsDefined("ATTRIBUTES.sqlOutputType")> ! <!---||| Return RAW SQL if Requested |||---> ! <cfif ATTRIBUTES.sqlOutputType IS "RAW" OR ATTRIBUTES.sqlOutputType IS "BOTH"> ! <cfset "CALLER.#ATTRIBUTES.rawOutput#" = rawSQL> ! </cfif> ! ! <!---||| Return HTML display friendly SQL if Requested |||---> ! <cfif ATTRIBUTES.sqlOutputType IS "HTML" OR ATTRIBUTES.sqlOutputType IS "BOTH"> ! <cfset "CALLER.#ATTRIBUTES.htmlOutput#" = htmlSQL> ! </cfif> ! </cfif> ! ! <!-----------------------------------> ! <!--- Execute ALTER TABLE Command ---> ! <!-----------------------------------> ! <!--- If Execution was requested ... ---> ! <cfif ATTRIBUTES.execute> ! <!---<cfquery name="#ATTRIBUTES.queryName#" datasource="#ATTRIBUTES.dataSource#" username="#ATTRIBUTES.userName#" password="#ATTRIBUTES.password#"> ! <!--- Execute Generated rawSQL ---> ! #rawSQL# ! </cfquery>---> ! </cfif> ! </cfcase> ! </cfswitch> ! ! <!---+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ! === MySQL CREATE TABLE Syntax === ! ! ALTER [IGNORE] TABLE tbl_name alter_spec [, alter_spec ...] ! ! alter_specification: ! ADD [COLUMN] create_definition [FIRST | AFTER column_name ] ! or ADD [COLUMN] (create_definition, create_definition,...) ! or ADD INDEX [index_name] (index_col_name,...) ! or ADD PRIMARY KEY (index_col_name,...) ! or ADD UNIQUE [index_name] (index_col_name,...) ! or ADD FULLTEXT [index_name] (index_col_name,...) ! or ADD [CONSTRAINT symbol] FOREIGN KEY [index_name] (index_col_name,...) ! [reference_definition] ! or ALTER [COLUMN] col_name {SET DEFAULT literal | DROP DEFAULT} ! or CHANGE [COLUMN] old_col_name create_definition ! [FIRST | AFTER column_name] ! or MODIFY [COLUMN] create_definition [FIRST | AFTER column_name] ! or DROP [COLUMN] col_name ! or DROP PRIMARY KEY ! or DROP INDEX index_name ! or DISABLE KEYS ! or ENABLE KEYS ! or RENAME [TO] new_tbl_name ! or ORDER BY col ! or table_options ! ! create_definition: ! col_name type [NOT NULL | NULL] [DEFAULT default_value] [AUTO_INCREMENT] ! [PRIMARY KEY] [reference_definition] ! or PRIMARY KEY (index_col_name,...) ! or KEY [index_name] (index_col_name,...) ! or INDEX [index_name] (index_col_name,...) ! or UNIQUE [INDEX] [index_name] (index_col_name,...) ! or FULLTEXT [INDEX] [index_name] (index_col_name,...) ! or [CONSTRAINT symbol] FOREIGN KEY [index_name] (index_col_name,...) ! [reference_definition] ! or CHECK (expr) ! ! type: ! TINYINT[(length)] [UNSIGNED] [ZEROFILL] ! or SMALLINT[(length)] [UNSIGNED] [ZEROFILL] ! or MEDIUMINT[(length)] [UNSIGNED] [ZEROFILL] ! or INT[(length)] [UNSIGNED] [ZEROFILL] ! or INTEGER[(length)] [UNSIGNED] [ZEROFILL] ! or BIGINT[(length)] [UNSIGNED] [ZEROFILL] ! or REAL[(length,decimals)] [UNSIGNED] [ZEROFILL] ! or DOUBLE[(length,decimals)] [UNSIGNED] [ZEROFILL] ! or FLOAT[(length,decimals)] [UNSIGNED] [ZEROFILL] ! or DECIMAL(length,decimals) [UNSIGNED] [ZEROFILL] ! or NUMERIC(length,decimals) [UNSIGNED] [ZEROFILL] ! or CHAR(length) [BINARY] ! or VARCHAR(length) [BINARY] ! or DATE ! or TIME ! or TIMESTAMP ! or DATETIME ! or TINYBLOB ! or BLOB ! or MEDIUMBLOB ! or LONGBLOB ! or TINYTEXT ! or TEXT ! or MEDIUMTEXT ! or LONGTEXT ! or ENUM(value1,value2,value3,...) ! or SET(value1,value2,value3,...) ! ! index_col_name: ! col_name [(length)] ! ! reference_definition: ! REFERENCES tbl_name [(index_col_name,...)] ! [MATCH FULL | MATCH PARTIAL] ! [ON DELETE reference_option] ! [ON UPDATE reference_option] ! ! reference_option: ! RESTRICT | CASCADE | SET NULL | NO ACTION | SET DEFAULT +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---> |
From: <nan...@us...> - 2003-06-13 21:17:28
|
Update of /cvsroot/mydatabasepilot/MyDatabasePilot/Query In directory sc8-pr-cvs1:/tmp/cvs-serv25583/Query Modified Files: alterTable.cfm Log Message: Functionality Added: [ 754236 ] Added Length and Decimals to REAL,FLOAT,DOUBLE,DECIMAL,NUMERIC field Types Index: alterTable.cfm =================================================================== RCS file: /cvsroot/mydatabasepilot/MyDatabasePilot/Query/alterTable.cfm,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** alterTable.cfm 13 Jun 2003 20:13:14 -0000 1.5 --- alterTable.cfm 13 Jun 2003 21:17:24 -0000 1.6 *************** *** 94,105 **** ---> </cfcase> ! <cfcase value="FLOAT,DOUBLE,DECIMAL"></cfcase> <cfcase value="DATE,TIME,DATETIME,YEAR,TIMESTAMP"></cfcase> <!--- - or REAL[(length,decimals)] [UNSIGNED] [ZEROFILL] - or DOUBLE[(length,decimals)] [UNSIGNED] [ZEROFILL] - or FLOAT[(length,decimals)] [UNSIGNED] [ZEROFILL] - or DECIMAL(length,decimals) [UNSIGNED] [ZEROFILL] - or NUMERIC(length,decimals) [UNSIGNED] [ZEROFILL] or CHAR(length) [BINARY] or VARCHAR(length) [BINARY] --- 94,132 ---- ---> </cfcase> ! <cfcase value="REAL,FLOAT,DOUBLE"> ! <!--- 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> ! <!--- ! REAL[(length,decimals)] [UNSIGNED] [ZEROFILL] ! DOUBLE[(length,decimals)] [UNSIGNED] [ZEROFILL] ! FLOAT[(length,decimals)] [UNSIGNED] [ZEROFILL] ! ---> ! </cfcase> ! <cfcase value="DECIMAL,NUMERIC"> ! <!--- 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> ! ! <!--- ! DECIMAL(length,decimals) [UNSIGNED] [ZEROFILL] ! NUMERIC(length,decimals) [UNSIGNED] [ZEROFILL] ! ---> ! </cfcase> <cfcase value="DATE,TIME,DATETIME,YEAR,TIMESTAMP"></cfcase> <!--- or CHAR(length) [BINARY] or VARCHAR(length) [BINARY] |
From: <nan...@us...> - 2003-06-13 20:24:24
|
Update of /cvsroot/mydatabasepilot/MyDatabasePilot/Styles In directory sc8-pr-cvs1:/tmp/cvs-serv17527/Styles Modified Files: master.css Log Message: Cosmetic Change: [ 754211 ] Added new CSS Class: - Added Class span.Number Index: master.css =================================================================== RCS file: /cvsroot/mydatabasepilot/MyDatabasePilot/Styles/master.css,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** master.css 12 Jun 2003 04:06:38 -0000 1.4 --- master.css 13 Jun 2003 20:24:21 -0000 1.5 *************** *** 1,113 **** ! /*Copyright: MyDatabase Pilot is distributed under the terms of the GNU GPL license*/ ! ! /*=== IDs ===*/ ! /* None for now */ ! ! /*=== Default Formating ===*/ ! body,p,div,span,ul,ol,li,dl,dt,dd,td,tr,th,blockquote,q,code,pre,tt,address,noscript{font-size:14px;} ! body,p,div,span,ul,ol,li,dl,dt,dd,td,tr,th,blockquote,q,code,pre,tt,address,noscript{color: #000000;} ! body{background:#CCCCFF; margin:0px; padding:0px;} ! body,p,div,span,ul,ol,li,dl,dt,dd,td,tr,th,address,noscript{font-family: "Times New Roman", Times, serif;} ! code,pre,tt {font-family: courier,sans-serif} ! blockquote,q{font-family: Arial, Helvetica, sans-serif;} ! ! /*=== Paragraph Formating ===*/ ! p{text-align:justify; text-indent:30px;} ! p:first-letter{font-size:16px; font-style:oblique; font-weight:bold;} ! p.Plain, p:first-letter.Plain{text-indent: 0px; font: normal normal 14px;} ! ! /*=== Headings ===*/ ! h1, h2, h3, h4, h5, h6{ ! font-family: serif, Geneva, sans-serif, Arial, Helvetica; ! color: #330066; ! background-color : #9999CC; ! font-weight : bold; ! font-style : italic; ! padding : 3px; ! margin-bottom : 3px; ! margin-top : 3px; ! } ! h1{font-size : 26px;border : ridge;text-align: center;} ! h2{text-indent : 5px;font-size : 23px;} ! h3{text-indent : 30px;font-size : 20px;} ! h4{text-indent :55px;font-size : 18px;} ! h5{text-indent : 80px;font-size : 16px;} ! H6{text-indent : 105px;font-size : 14px;} ! ! /*=== Links ===*/ ! a{font-weight: inherit; font-size : inherit; font-family : inherit;} ! a:Link{color : #0066CC;} ! a:Visited{color : #9900CC;} ! a:Link, a:Visited{text-decoration: none;background-color : #FFFFCC;} ! a:Hover, a:Visited:Hover{color: #990000;text-decoration: underline;background-color : #FFFF99;} ! a:Active{color:#FF0000;text-decoration: underline;background-color : #FFFF99;} ! ! /*=== Forms ===*/ ! form,label,input,select,optgroup,option,textarea,fieldset,legend,button{ ! font-size : 11pt; ! font-family : Arial, Helvetica, sans-serif; ! } ! ! /*=== General Classes ===*/ ! .ToDo{ ! background : #FF9900; ! color : #990066; ! font-size : 11pt; ! } ! .Warning{ ! background : #FF9900; ! color : #990066; ! font-size : 16pt; ! } ! ! .Bold{font-weight:bold;} ! .BoldCenter{font-weight:bold;text-align:center;} ! .Center{text-align:center} ! .Right{text-align:right;} ! ! /*=== Tag Specific Classes ===*/ ! tr.Head{background:#9999CC;} ! tr.Odd{background:#999966;} ! tr.Even{background:#CCCC99;} ! ! /* Code Blocks */ ! div.Code, pre.Code{ ! text-align : left; ! background-color : #FFFF99; ! color: #666666; ! margin : 5px 20px 5px 20px; ! font-family : "Courier New", Courier, monospace; ! padding : 5px 20px 5px 20px; ! font-size : 11pt; ! border: 1px dotted #FF0000; ! } ! ! span.Code,span.KeyWord,span.String,span.Missing{ ! background-color : #FFFF99; ! font-family : "Courier New", Courier, monospace; ! font-size : 11pt; ! font-weight: bold; ! } ! span.Code{color: #666666;} ! span.KeyWord{color:#3366CC;} ! span.String{color:#009900;} ! span.Missing{color:#FF0000;text-decoration:underline;} ! ! /* Fancy Form */ ! form.Fancy,fieldset.Fancy{ ! color : #000000; ! padding : 3px 3px 3px; ! border : 3px ridge; ! } ! form.Fancy{ ! background-color : #CCCC99; ! margin: 15px 15px 15px 15px; ! } ! fieldset.Fancy{margin: 5px 5px 5px 5px;} ! legend.Fancy{color: #660099;font : small-caps;letter-spacing: 4px;} ! label.Fancy,input.Fancy,select.Fancy,textarea.Fancy,button.Fancy,legend.Fancy{margin: 2px 2px 2px 2px;} ! label.Fancy{color: #663300;} ! input.Fancy,select.Fancy,optgroup.Fancy,option.Fancy,textarea.Fancy,button.Fancy{ ! background-color : #FFFFCC; ! color: #666666; } --- 1,114 ---- ! /*Copyright: MyDatabase Pilot is distributed under the terms of the GNU GPL license*/ ! ! /*=== IDs ===*/ ! /* None for now */ ! ! /*=== Default Formating ===*/ ! body,p,div,span,ul,ol,li,dl,dt,dd,td,tr,th,blockquote,q,code,pre,tt,address,noscript{font-size:14px;} ! body,p,div,span,ul,ol,li,dl,dt,dd,td,tr,th,blockquote,q,code,pre,tt,address,noscript{color: #000000;} ! body{background:#CCCCFF; margin:0px; padding:0px;} ! body,p,div,span,ul,ol,li,dl,dt,dd,td,tr,th,address,noscript{font-family: "Times New Roman", Times, serif;} ! code,pre,tt {font-family: courier,sans-serif} ! blockquote,q{font-family: Arial, Helvetica, sans-serif;} ! ! /*=== Paragraph Formating ===*/ ! p{text-align:justify; text-indent:30px;} ! p:first-letter{font-size:16px; font-style:oblique; font-weight:bold;} ! p.Plain, p:first-letter.Plain{text-indent: 0px; font: normal normal 14px;} ! ! /*=== Headings ===*/ ! h1, h2, h3, h4, h5, h6{ ! font-family: serif, Geneva, sans-serif, Arial, Helvetica; ! color: #330066; ! background-color : #9999CC; ! font-weight : bold; ! font-style : italic; ! padding : 3px; ! margin-bottom : 3px; ! margin-top : 3px; ! } ! h1{font-size : 26px;border : ridge;text-align: center;} ! h2{text-indent : 5px;font-size : 23px;} ! h3{text-indent : 30px;font-size : 20px;} ! h4{text-indent :55px;font-size : 18px;} ! h5{text-indent : 80px;font-size : 16px;} ! H6{text-indent : 105px;font-size : 14px;} ! ! /*=== Links ===*/ ! a{font-weight: inherit; font-size : inherit; font-family : inherit;} ! a:Link{color : #0066CC;} ! a:Visited{color : #9900CC;} ! a:Link, a:Visited{text-decoration: none;background-color : #FFFFCC;} ! a:Hover, a:Visited:Hover{color: #990000;text-decoration: underline;background-color : #FFFF99;} ! a:Active{color:#FF0000;text-decoration: underline;background-color : #FFFF99;} ! ! /*=== Forms ===*/ ! form,label,input,select,optgroup,option,textarea,fieldset,legend,button{ ! font-size : 11pt; ! font-family : Arial, Helvetica, sans-serif; ! } ! ! /*=== General Classes ===*/ ! .ToDo{ ! background : #FF9900; ! color : #990066; ! font-size : 11pt; ! } ! .Warning{ ! background : #FF9900; ! color : #990066; ! font-size : 16pt; ! } ! ! .Bold{font-weight:bold;} ! .BoldCenter{font-weight:bold;text-align:center;} ! .Center{text-align:center} ! .Right{text-align:right;} ! ! /*=== Tag Specific Classes ===*/ ! tr.Head{background:#9999CC;} ! tr.Odd{background:#999966;} ! tr.Even{background:#CCCC99;} ! ! /* Code Blocks */ ! div.Code, pre.Code{ ! text-align : left; ! background-color : #FFFF99; ! color: #666666; ! margin : 5px 20px 5px 20px; ! font-family : "Courier New", Courier, monospace; ! padding : 5px 20px 5px 20px; ! font-size : 11pt; ! border: 1px dotted #FF0000; ! } ! ! span.Code,span.KeyWord,span.String,span.Missing,span.Number{ ! background-color : #FFFF99; ! font-family : "Courier New", Courier, monospace; ! font-size : 11pt; ! font-weight: bold; ! } ! span.Code{color: #666666;} ! span.KeyWord{color:#3366CC;} ! span.String{color:#009900;} ! span.Missing{color:#FF0000;text-decoration:underline;} ! span.Number{color:#FF00FF;} ! ! /* Fancy Form */ ! form.Fancy,fieldset.Fancy{ ! color : #000000; ! padding : 3px 3px 3px; ! border : 3px ridge; ! } ! form.Fancy{ ! background-color : #CCCC99; ! margin: 15px 15px 15px 15px; ! } ! fieldset.Fancy{margin: 5px 5px 5px 5px;} ! legend.Fancy{color: #660099;font : small-caps;letter-spacing: 4px;} ! label.Fancy,input.Fancy,select.Fancy,textarea.Fancy,button.Fancy,legend.Fancy{margin: 2px 2px 2px 2px;} ! label.Fancy{color: #663300;} ! input.Fancy,select.Fancy,optgroup.Fancy,option.Fancy,textarea.Fancy,button.Fancy{ ! background-color : #FFFFCC; ! color: #666666; } |
From: <nan...@us...> - 2003-06-13 20:13:17
|
Update of /cvsroot/mydatabasepilot/MyDatabasePilot/Query In directory sc8-pr-cvs1:/tmp/cvs-serv16008/Query Modified Files: alterTable.cfm Log Message: Functionality Added: [ 754207 ] Added Length to Integer Column Types in alterTable.cfm Query Index: alterTable.cfm =================================================================== RCS file: /cvsroot/mydatabasepilot/MyDatabasePilot/Query/alterTable.cfm,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** alterTable.cfm 13 Jun 2003 15:10:12 -0000 1.4 --- alterTable.cfm 13 Jun 2003 20:13:14 -0000 1.5 *************** *** 79,93 **** <cfcase value="TINYBLOB,BLOB,MEDIUMBLOB,LONGBLOB,TINYTEXT,TEXT,MEDIUMTEXT,LONGTEXT"></cfcase> <cfcase value="ENUM,SET"></cfcase> ! <cfcase value="TINYINT,SMALLINT,MEDIUMINT,INT,BIGINT"></cfcase> <cfcase value="FLOAT,DOUBLE,DECIMAL"></cfcase> <cfcase value="DATE,TIME,DATETIME,YEAR,TIMESTAMP"></cfcase> - <!--- - TINYINT[(length)] [UNSIGNED] [ZEROFILL] - or SMALLINT[(length)] [UNSIGNED] [ZEROFILL] - or MEDIUMINT[(length)] [UNSIGNED] [ZEROFILL] - or INT[(length)] [UNSIGNED] [ZEROFILL] - or INTEGER[(length)] [UNSIGNED] [ZEROFILL] - or BIGINT[(length)] [UNSIGNED] [ZEROFILL] or REAL[(length,decimals)] [UNSIGNED] [ZEROFILL] or DOUBLE[(length,decimals)] [UNSIGNED] [ZEROFILL] --- 79,100 ---- <cfcase value="TINYBLOB,BLOB,MEDIUMBLOB,LONGBLOB,TINYTEXT,TEXT,MEDIUMTEXT,LONGTEXT"></cfcase> <cfcase value="ENUM,SET"></cfcase> ! <cfcase value="TINYINT,SMALLINT,MEDIUMINT,INT,INTEGER,BIGINT"> ! <!--- 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> ! <!--- ! TINYINT[(length)] [UNSIGNED] [ZEROFILL] ! SMALLINT[(length)] [UNSIGNED] [ZEROFILL] ! MEDIUMINT[(length)] [UNSIGNED] [ZEROFILL] ! INT[(length)] [UNSIGNED] [ZEROFILL] ! INTEGER[(length)] [UNSIGNED] [ZEROFILL] ! BIGINT[(length)] [UNSIGNED] [ZEROFILL] ! ---> ! </cfcase> <cfcase value="FLOAT,DOUBLE,DECIMAL"></cfcase> <cfcase value="DATE,TIME,DATETIME,YEAR,TIMESTAMP"></cfcase> <!--- or REAL[(length,decimals)] [UNSIGNED] [ZEROFILL] or DOUBLE[(length,decimals)] [UNSIGNED] [ZEROFILL] |