use super::schema::TrxHook;

pub async fn reseed_db(trx: &mut TrxHook<'_>) -> sqlx::Result<()> {
	sqlx::query!("truncate doll_profiles, users;")
		.execute(&mut **trx)
		.await?;

	sqlx::query_file!("src/db/queries/reseed-users.sql")
		.execute(&mut **trx)
		.await?;

	sqlx::query_file!("src/db/queries/reseed-tags.sql")
		.execute(&mut **trx)
		.await?;

	Ok(())
}
