Skip to content

Commit

Permalink
FC-3056 change default datetime precision to 3 instead of 6
Browse files Browse the repository at this point in the history
  • Loading branch information
justincarter committed Dec 7, 2015
1 parent 4deb088 commit 00aa36a
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion packages/dbgateways/H2Gateway.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,7 @@
</cfcase>
<cfcase value="datetime,timestamp" delimiters=",">
<cfset stColumn.type = "datetime" />
<cfset stColumn.precision = "6" />
<cfset stColumn.precision = "3" />
<cfif stColumn.default gt dateadd('yyyy',100,now()) and stColumn.nullable>
<cfset stColumn.default = "NULL" />
<cfelseif stColumn.default gt dateadd('yyyy',100,now())>
Expand Down
2 changes: 1 addition & 1 deletion packages/dbgateways/MSSQL2005Gateway.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@
</cfcase>
<cfcase value="datetime,datetime2" delimiters=",">
<cfset stColumn.type = "datetime" />
<cfset stColumn.precision = "6" />
<cfset stColumn.precision = "3" />
<cfif stColumn.default gt dateadd('yyyy',100,now()) and stColumn.nullable>
<cfset stColumn.default = "NULL" />
<cfelseif stColumn.default gt dateadd('yyyy',100,now())>
Expand Down
6 changes: 3 additions & 3 deletions packages/dbgateways/MSSQL2012Gateway.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
<cfcase value="longchar"><cfoutput>nvarchar(MAX) </cfoutput></cfcase>
<cfcase value="datetime">
<cfif stProp.precision eq "">
<cfoutput>datetime2(6) </cfoutput>
<cfoutput>datetime2(3) </cfoutput>
<cfelse>
<cfoutput>datetime2(#stProp.precision#) </cfoutput>
</cfif>
Expand Down Expand Up @@ -157,7 +157,7 @@
<cfcase value="longchar">nvarchar(MAX)</cfcase>
<cfcase value="datetime">
<cfif stProp.precision eq "">
datetime2(6)
datetime2(3)
<cfelse>
datetime2(#stProp.precision#)
</cfif>
Expand Down Expand Up @@ -281,7 +281,7 @@
<cfcase value="longchar">nvarchar(MAX)</cfcase>
<cfcase value="datetime">
<cfif stProp.precision eq "">
datetime2(6)
datetime2(3)
<cfelse>
datetime2(#stProp.precision#)
</cfif>
Expand Down
2 changes: 1 addition & 1 deletion packages/dbgateways/MSSQLGateway.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -770,7 +770,7 @@
</cfcase>
<cfcase value="datetime,datetime2" delimiters=",">
<cfset stColumn.type = "datetime" />
<cfset stColumn.precision = "6" />
<cfset stColumn.precision = "3" />
<cfif stColumn.default gt dateadd('yyyy',100,now()) and stColumn.nullable>
<cfset stColumn.default = "NULL" />
<cfelseif stColumn.default gt dateadd('yyyy',100,now())>
Expand Down
2 changes: 1 addition & 1 deletion packages/dbgateways/MySQLGateway.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,7 @@
</cfcase>
<cfcase value="datetime">
<cfset stColumn.type = "datetime" />
<cfset stColumn.precision = "6" />
<cfset stColumn.precision = "3" />
<cfif stColumn.default gt dateadd('yyyy',100,now()) and stColumn.nullable>
<cfset stColumn.default = "NULL" />
<cfelseif stColumn.default gt dateadd('yyyy',100,now())>
Expand Down
2 changes: 1 addition & 1 deletion packages/lib/db.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@
</cfcase>
<cfcase value="date,datetime" delimiters=",">
<cfset stResult.type = "datetime" />
<cfset stResult.precision = "6" />
<cfset stResult.precision = "3" />
</cfcase>
<cfcase value="numeric">
<cfset stResult.type = "numeric" />
Expand Down

0 comments on commit 00aa36a

Please sign in to comment.