mirror of
https://github.com/documize/community.git
synced 2025-07-19 13:19:43 +02:00
Add experimental string to timestamp for backup/restore
This commit is contained in:
parent
3913995dd0
commit
1d8bb2d3ad
3 changed files with 25 additions and 14 deletions
|
@ -339,6 +339,15 @@ func (p MySQLProvider) VerfiyCharacterCollation(charset, collation string) (char
|
|||
return true, ""
|
||||
}
|
||||
|
||||
// ConvertTimestamp returns SQL function to correctly convert
|
||||
// ISO 8601 format (e.g. '2016-09-08T06:37:23Z') to SQL specific
|
||||
// timestamp value (e.g. 2016-09-08 06:37:23).
|
||||
// Must use ? for parameter placeholder character as DB layer
|
||||
// will convert to database specific parameter placeholder character.
|
||||
func (p MySQLProvider) ConvertTimestamp() (statement string) {
|
||||
return `STR_TO_DATE(?,'%Y-%m-%d %H:%i:%s')`
|
||||
}
|
||||
|
||||
// convertDatabaseVersion turns database version string as major,minor,patch numerics.
|
||||
func convertDatabaseVersion(v string) (ints []int, err error) {
|
||||
ints = []int{0, 0, 0}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue