createdAt DESC with quotation marks did not work with MySQL fixes #565
This commit is contained in:
parent
a99cac0cf0
commit
724a6bc26f
1 changed files with 4 additions and 4 deletions
|
@ -110,7 +110,7 @@ module.exports = function (sequelize, DataTypes) {
|
||||||
where: {
|
where: {
|
||||||
noteId: note.id
|
noteId: note.id
|
||||||
},
|
},
|
||||||
order: '"createdAt" DESC'
|
order: [['createdAt', 'DESC']]
|
||||||
}).then(function (revisions) {
|
}).then(function (revisions) {
|
||||||
var data = []
|
var data = []
|
||||||
for (var i = 0, l = revisions.length; i < l; i++) {
|
for (var i = 0, l = revisions.length; i < l; i++) {
|
||||||
|
@ -131,7 +131,7 @@ module.exports = function (sequelize, DataTypes) {
|
||||||
where: {
|
where: {
|
||||||
noteId: note.id
|
noteId: note.id
|
||||||
},
|
},
|
||||||
order: '"createdAt" DESC'
|
order: [['createdAt', 'DESC']]
|
||||||
}).then(function (revisions) {
|
}).then(function (revisions) {
|
||||||
if (revisions.length <= 0) return callback(null, null)
|
if (revisions.length <= 0) return callback(null, null)
|
||||||
// measure target revision position
|
// measure target revision position
|
||||||
|
@ -142,7 +142,7 @@ module.exports = function (sequelize, DataTypes) {
|
||||||
$gte: time
|
$gte: time
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
order: '"createdAt" DESC'
|
order: [['createdAt', 'DESC']]
|
||||||
}).then(function (count) {
|
}).then(function (count) {
|
||||||
if (count <= 0) return callback(null, null)
|
if (count <= 0) return callback(null, null)
|
||||||
sendDmpWorker({
|
sendDmpWorker({
|
||||||
|
@ -231,7 +231,7 @@ module.exports = function (sequelize, DataTypes) {
|
||||||
where: {
|
where: {
|
||||||
noteId: note.id
|
noteId: note.id
|
||||||
},
|
},
|
||||||
order: '"createdAt" DESC'
|
order: [['createdAt', 'DESC']]
|
||||||
}).then(function (revisions) {
|
}).then(function (revisions) {
|
||||||
if (revisions.length <= 0) {
|
if (revisions.length <= 0) {
|
||||||
// if no revision available
|
// if no revision available
|
||||||
|
|
Loading…
Reference in a new issue