Skip to content

Commit

Permalink
Merge master into en
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] authored Jul 26, 2024
2 parents 6e07aaa + 7639e55 commit cb19de5
Show file tree
Hide file tree
Showing 3 changed files with 67 additions and 798 deletions.
18 changes: 18 additions & 0 deletions migrations/20240721234722-login_to_string.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/**
* Copyright: The PastVu contributors.
* GNU Affero General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/agpl.txt)
*/

/**
* Update numeric login to string. We have some old numeric logins, they fail on profile
* viewing.
*/
module.exports = {
async up(db) {
await db.collection('users').updateMany({ login: { $type: 1 } }, [{ $set: { login: { $toString: '$login' } } }]);
},

async down() {
// No rollback.
},
};
Loading

0 comments on commit cb19de5

Please sign in to comment.