chore: server code formatting
This commit is contained in:
parent
aedabcbdee
commit
68517170e2
234 changed files with 9824 additions and 6195 deletions
|
|
@ -1,15 +1,15 @@
|
|||
const db = require('../lib/db')
|
||||
const logger = require('./logger')
|
||||
|
||||
const upsert = 'insert into migrations (id, data) values (1, $1) on conflict (id) do update set data = $1'
|
||||
const upsert =
|
||||
'insert into migrations (id, data) values (1, $1) on conflict (id) do update set data = $1'
|
||||
|
||||
function DbMigrateStore () {
|
||||
}
|
||||
function DbMigrateStore() {}
|
||||
|
||||
DbMigrateStore.prototype.save = function (set, fn) {
|
||||
let insertData = JSON.stringify({
|
||||
lastRun: set.lastRun,
|
||||
migrations: set.migrations
|
||||
migrations: set.migrations,
|
||||
})
|
||||
db.none(upsert, [insertData]).then(fn).catch(logger.error)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue