Make db avatar migrations postgres compatible

Fixes https://github.com/turt2live/matrix-dimension/issues/431
This commit is contained in:
Travis Ralston 2021-09-07 23:24:43 -06:00
parent e2d4ae5e7f
commit 6964bca40e
2 changed files with 8 additions and 8 deletions

View File

@ -5,12 +5,12 @@ export default {
return Promise.resolve()
.then(() =>
queryInterface.sequelize.query(
"UPDATE dimension_widgets SET avatarUrl = REPLACE(avatarUrl, '/img/', '/assets/img/')"
`UPDATE dimension_widgets SET "avatarUrl" = REPLACE("avatarUrl", '/img/', '/assets/img/')`
)
)
.then(() =>
queryInterface.sequelize.query(
"UPDATE dimension_bridges SET avatarUrl = REPLACE(avatarUrl, '/img/', '/assets/img/')"
`UPDATE dimension_bridges SET "avatarUrl" = REPLACE("avatarUrl", '/img/', '/assets/img/')`
)
);
},
@ -18,12 +18,12 @@ export default {
return Promise.resolve()
.then(() =>
queryInterface.sequelize.query(
"UPDATE dimension_widgets SET avatarUrl = REPLACE(avatarUrl, '/assets/img/', '/img/')"
`UPDATE dimension_widgets SET "avatarUrl" = REPLACE("avatarUrl", '/assets/img/', '/img/')`
)
)
.then(() =>
queryInterface.sequelize.query(
"UPDATE dimension_bridges SET avatarUrl = REPLACE(avatarUrl, '/assets/img/', '/img/')"
`UPDATE dimension_bridges SET "avatarUrl" = REPLACE("avatarUrl", '/assets/img/', '/img/')`
)
);
},

View File

@ -5,12 +5,12 @@ export default {
return Promise.resolve()
.then(() =>
queryInterface.sequelize.query(
"UPDATE dimension_appservice_users SET avatarUrl = REPLACE(avatarUrl, '/img/', '/assets/img/')"
`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/')"
`UPDATE dimension_neb_integrations SET "avatarUrl" = REPLACE("avatarUrl", '/img/', '/assets/img/')`
)
);
},
@ -18,12 +18,12 @@ export default {
return Promise.resolve()
.then(() =>
queryInterface.sequelize.query(
"UPDATE dimension_appservice_users SET avatarUrl = REPLACE(avatarUrl, '/assets/img/', '/img/')"
`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/')"
`UPDATE dimension_neb_integrations SET "avatarUrl" = REPLACE("avatarUrl", '/assets/img/', '/img/')`
)
);
},