fix: Impl. fix for migration 20240711194701
All checks were successful
AstralRinth App build / Build (x86_64-unknown-linux-gnu, ubuntu-latest) (push) Successful in 35m18s

This commit is contained in:
2025-07-08 03:42:03 +03:00
parent a64c3360d2
commit 585935c799

View File

@@ -30,6 +30,8 @@ pub(crate) async fn connect() -> crate::Result<Pool<Sqlite>> {
.connect_with(conn_options)
.await?;
fix_migration_20240711194701(&pool).await?; // Patch by AstralRinth - 08.07.2025
sqlx::migrate!().run(&pool).await?;
if let Err(err) = stale_data_cleanup(&pool).await {
@@ -62,3 +64,18 @@ async fn stale_data_cleanup(pool: &Pool<Sqlite>) -> crate::Result<()> {
Ok(())
}
/*
// Patch by AstralRinth - 08.07.2025
*/
async fn fix_migration_20240711194701(pool: &Pool<Sqlite>) -> crate::Result<()> {
sqlx::query(
r#"
UPDATE "_sqlx_migrations"
SET checksum = X'e973512979feac07e415405291eefafc1ef0bd89454958ad66f5452c381db8679c20ffadab55194ecf6ba8ec4ca2db21'
WHERE version = '20240711194701';
"#,
)
.execute(pool)
.await?;
Ok(())
}