Skip to content
Commits on Source (5)
# [1.40.0](https://gitlab.coko.foundation/ketida/server/compare/v1.39.0...v1.40.0) (2024-11-04)
### Features
* **models:** add migration to rename lategrey-\>slategrey ([d189329](https://gitlab.coko.foundation/ketida/server/commit/d1893293433f61ea690f5697798c182458300440))
# [1.39.0](https://gitlab.coko.foundation/ketida/server/compare/v1.38.9...v1.39.0) (2024-10-29)
......
const { logger, useTransaction } = require('@coko/server')
exports.up = async knex => {
try {
return useTransaction(async trx => {
await knex('template').transacting(trx).where('name', 'lategrey').update({
name: 'slategrey',
})
})
} catch (e) {
logger.error(e)
throw new Error(
'Migration: Template: renamed "lategrey" to "slategrey" successfully.',
)
}
}
exports.down = async knex => {
try {
return useTransaction(async trx => {
await knex('template')
.transacting(trx)
.where('name', 'slategrey')
.update({
name: 'lategrey',
})
})
} catch (e) {
logger.error(e)
throw new Error(
`Migration: Template: renaming "lategrey" to "slategrey" failed`,
)
}
}
{
"name": "server",
"version": "1.39.0",
"version": "1.40.0",
"private": true,
"description": "Ketida's Platform common server",
"repository": {
......