blob: 5d2a4672a1980cb37d265d9f52e43cccad3bfa7f (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
|
exports.up = function(knex) {
return Promise.all([
knex.raw("UPDATE users SET username = REPLACE(username, ' ', '')"), // just in case valid users have trailing spaces in their username
knex.raw("DELETE FROM users WHERE !(username REGEXP '^[a-zA-Z0-9\.\_\@\-]{3,32}$')"),
])
};
exports.down = function(knex) {
};
|