diff --git a/server/migrate.js b/server/migrate.js index 85895106..02319de4 100644 --- a/server/migrate.js +++ b/server/migrate.js @@ -7,17 +7,3 @@ async function migrate() { } migrate(); - -// temporary code for a non-sqlite migration: -const normalise = s => s.trim().toLowerCase(); - -async function populateUsernameNorm() { - const db = await dbConnection(); - for ({id, username} of await db.all(`SELECT id, username FROM users WHERE usernameNorm IS NULL`)) { - const norm = normalise(username); // username is safe, so so will be norm - console.log(username, norm) - await db.all(`UPDATE users SET usernameNorm = '${norm}' WHERE id = '${id}'`); - } - await db.close(); -} -populateUsernameNorm();