mirror of
https://github.com/apache/superset.git
synced 2024-09-12 00:29:39 -04:00
Adding in Second and Minute time grains for MySQL (#696)
* Added documentation of the health check endpoint
* Adding Minute and Second time grains for MySQL
* Fixed Migration script so that it doesn't break when new fields added to the models for Dashboards or Slices (using declarative base)
* Revert "Fixed Migration script so that it doesn't break when new fields added to the models for Dashboards or Slices (using declarative base)"
This reverts commit 0b6dd696d6
.
* Code Cleanliness
This commit is contained in:
parent
09c95fb28a
commit
65efe53bfc
@ -414,6 +414,11 @@ class Database(Model, AuditMixinNullable):
|
||||
),
|
||||
'mysql': (
|
||||
Grain('Time Column', _('Time Column'), '{col}'),
|
||||
Grain("second", _('second'), "DATE_ADD(DATE({col}), "
|
||||
"INTERVAL (HOUR({col})*60*60 + MINUTE({col})*60"
|
||||
" + SECOND({col})) SECOND)"),
|
||||
Grain("minute", _('minute'), "DATE_ADD(DATE({col}), "
|
||||
"INTERVAL (HOUR({col})*60 + MINUTE({col})) MINUTE)"),
|
||||
Grain("hour", _('hour'), "DATE_ADD(DATE({col}), "
|
||||
"INTERVAL HOUR({col}) HOUR)"),
|
||||
Grain('day', _('day'), 'DATE({col})'),
|
||||
|
Loading…
Reference in New Issue
Block a user