collab: Backfill github_user_created_at
on users (#16600)
This PR adds a backfiller to backfill the `github_user_created_at` column on users. Release Notes: - N/A
This commit is contained in:
parent
28568429aa
commit
8a5fcc2c22
6 changed files with 153 additions and 0 deletions
|
@ -377,4 +377,14 @@ impl Database {
|
|||
})
|
||||
.await
|
||||
}
|
||||
|
||||
pub async fn get_users_missing_github_user_created_at(&self) -> Result<Vec<user::Model>> {
|
||||
self.transaction(|tx| async move {
|
||||
Ok(user::Entity::find()
|
||||
.filter(user::Column::GithubUserCreatedAt.is_null())
|
||||
.all(&*tx)
|
||||
.await?)
|
||||
})
|
||||
.await
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue