chore: undo $ prepend on queries

This commit is contained in:
Taranto 2021-07-22 11:06:39 +01:00 committed by Josh Harvey
parent f3f2bb01b0
commit ba4117173e
50 changed files with 215 additions and 227 deletions

View file

@ -23,12 +23,12 @@ const getMigrateFile = () => {
const store = defaultStore()
asyncLocalStorage.run(store, () => {
db.$none(createMigration)
.then(() => Promise.all([db.$oneOrNone(select), getMigrateFile()]))
db.none(createMigration)
.then(() => Promise.all([db.oneOrNone(select), getMigrateFile()]))
.then(([qResult, migrateFile]) => {
process.env.SKIP_SERVER_LOGS = !(qResult && qResult.data.migrations.find(({ title }) => title === '1572524820075-server-support-logs.js'))
if (!qResult && migrateFile) {
return db.$none('insert into migrations (id, data) values (1, $1)', [migrateFile])
return db.none('insert into migrations (id, data) values (1, $1)', [migrateFile])
}
})
.then(() => migrate.run())