fix(pockethost): disable unneeded mothership migrations

This commit is contained in:
Ben Allfree 2024-07-28 01:23:00 +00:00
parent 457f33b754
commit 1c031f46af
3 changed files with 10 additions and 11 deletions

View File

@ -0,0 +1,10 @@
/** Migrate version numbers */
onAfterBootstrap((e) => {
const dao = $app.dao()
console.log(`***Migrating regions`)
dao
.db()
.newQuery(`update instances set region='sfo-1' where region=''`)
.execute()
})

View File

@ -1,11 +0,0 @@
/** Migrate version numbers */
onAfterBootstrap((e) => {
const dao = $app.dao()
console.log(`***Migrating regions`)
const records = dao.findRecordsByFilter(`instances`, '1=1')
records.forEach((record) => {
record.set(`region`, `sfo-1`)
dao.saveRecord(record)
})
})