Merge pull request #430 from TheTimeWalker/fix-neb-avatar

Update URLs for neb bots
This commit is contained in:
Travis Ralston 2021-09-06 15:30:43 -06:00 committed by GitHub
commit e2d4ae5e7f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -0,0 +1,30 @@
import { QueryInterface } from "sequelize";
export default {
up: (queryInterface: QueryInterface) => {
return Promise.resolve()
.then(() =>
queryInterface.sequelize.query(
"UPDATE dimension_appservice_users SET avatarUrl = REPLACE(avatarUrl, '/img/', '/assets/img/')"
)
)
.then(() =>
queryInterface.sequelize.query(
"UPDATE dimension_neb_integrations SET avatarUrl = REPLACE(avatarUrl, '/img/', '/assets/img/')"
)
);
},
down: (queryInterface: QueryInterface) => {
return Promise.resolve()
.then(() =>
queryInterface.sequelize.query(
"UPDATE dimension_appservice_users SET avatarUrl = REPLACE(avatarUrl, '/assets/img/', '/img/')"
)
)
.then(() =>
queryInterface.sequelize.query(
"UPDATE dimension_neb_integrations SET avatarUrl = REPLACE(avatarUrl, '/assets/img/', '/img/')"
)
);
},
};