format for latest standard
This commit is contained in:
parent
4108efd9c7
commit
c2af183911
77 changed files with 1697 additions and 1693 deletions
|
|
@ -3,23 +3,23 @@ const migrateTools = require('./migrate-tools')
|
|||
|
||||
exports.up = function (next) {
|
||||
return migrateTools.migrateNames()
|
||||
.then(updateSql => {
|
||||
const sql = [
|
||||
'alter table devices add column name text',
|
||||
updateSql,
|
||||
'alter table devices alter column name set not null'
|
||||
]
|
||||
.then(updateSql => {
|
||||
const sql = [
|
||||
'alter table devices add column name text',
|
||||
updateSql,
|
||||
'alter table devices alter column name set not null'
|
||||
]
|
||||
|
||||
return db.multi(sql, next)
|
||||
})
|
||||
.catch(() => {
|
||||
const sql = [
|
||||
'alter table devices add column name text',
|
||||
'alter table devices alter column name set not null'
|
||||
]
|
||||
return db.multi(sql, next)
|
||||
})
|
||||
.catch(() => {
|
||||
const sql = [
|
||||
'alter table devices add column name text',
|
||||
'alter table devices alter column name set not null'
|
||||
]
|
||||
|
||||
return db.multi(sql, next)
|
||||
})
|
||||
return db.multi(sql, next)
|
||||
})
|
||||
}
|
||||
|
||||
exports.down = function (next) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue