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:
parent
e74ac423c6
commit
22c1260a26
@ -344,7 +344,7 @@ export class UserStore implements IUserStore {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async getFirstUserDate(): Promise<Date | null> {
|
async getFirstUserDate(): Promise<Date | null> {
|
||||||
const firstInstanceUser = await this.db('users')
|
const firstInstanceUser = await this.db(TABLE)
|
||||||
.select('created_at')
|
.select('created_at')
|
||||||
.where('is_system', '=', false)
|
.where('is_system', '=', false)
|
||||||
.orderBy('created_at', 'asc')
|
.orderBy('created_at', 'asc')
|
||||||
@ -352,4 +352,13 @@ export class UserStore implements IUserStore {
|
|||||||
|
|
||||||
return firstInstanceUser ? firstInstanceUser.created_at : null;
|
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));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user