1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-09-24 17:51:14 +02:00

chore: include funciton to size the issue

This commit is contained in:
Gastón Fournier 2025-09-22 17:34:05 +02:00
parent e74ac423c6
commit 22c1260a26
No known key found for this signature in database
GPG Key ID: AF45428626E17A8E

View File

@ -344,7 +344,7 @@ export class UserStore implements IUserStore {
}
async getFirstUserDate(): Promise<Date | null> {
const firstInstanceUser = await this.db('users')
const firstInstanceUser = await this.db(TABLE)
.select('created_at')
.where('is_system', '=', false)
.orderBy('created_at', 'asc')
@ -352,4 +352,13 @@ export class UserStore implements IUserStore {
return firstInstanceUser ? firstInstanceUser.created_at : null;
}
// this is temporary to find out how many cases we have
async findDeletedUsersWithEmail(): Promise<User[]> {
return this.db(TABLE)
.select('*')
.whereNotNull('deleted_at')
.andWhereRaw('length(email) > 0')
.then((rows) => rows.map(rowToUser));
}
}