forked from didirus/AstralRinth
fix: Impl. fix for migration 20240711194701
This commit is contained in:
@@ -30,6 +30,8 @@ pub(crate) async fn connect() -> crate::Result<Pool<Sqlite>> {
|
|||||||
.connect_with(conn_options)
|
.connect_with(conn_options)
|
||||||
.await?;
|
.await?;
|
||||||
|
|
||||||
|
fix_migration_20240711194701(&pool).await?; // Patch by AstralRinth - 08.07.2025
|
||||||
|
|
||||||
sqlx::migrate!().run(&pool).await?;
|
sqlx::migrate!().run(&pool).await?;
|
||||||
|
|
||||||
if let Err(err) = stale_data_cleanup(&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(())
|
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(())
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user