diff --git a/src/store/migration.rs b/src/store/migration.rs index 04b6a46e3..3a0f43525 100644 --- a/src/store/migration.rs +++ b/src/store/migration.rs @@ -152,25 +152,6 @@ pub trait Migration: Send + Sync { /// returns migration version, use `date +'%Y%m%d%H%M%S'` timestamp format fn version(&self) -> &str; - - /// Will cost a lot of time to perform this migration operation. - /// - /// Override this function for `Migrations` which could be executed very fast. - fn expensive(&self) -> bool { - true - } - - /// Check if the background migration can be resumed. - /// - /// If a migration can be resumed, it should implement the recovery logic in `migrate` function. - /// and the `MigirateWorker` will add the migration's handler with `register_thread`, so that then - /// main thread can wait for the background migration to store the progress and exit. - /// - /// Otherwise, the migration will be restarted from the beginning. - /// - fn can_resume(&self) -> bool { - false - } } const INIT_DB_VERSION: &str = "20241116135521"; @@ -199,8 +180,4 @@ impl Migration for DefaultMigration { fn version(&self) -> &str { &self.version } - - fn expensive(&self) -> bool { - false - } } diff --git a/src/store/migrations/sample.rs b/src/store/migrations/sample.rs index 59c2eab01..1ca8cb207 100644 --- a/src/store/migrations/sample.rs +++ b/src/store/migrations/sample.rs @@ -30,8 +30,4 @@ impl Migration for SampleMigration { fn version(&self) -> &str { &self.version } - - fn expensive(&self) -> bool { - false - } } diff --git a/src/store/tests/migrate.rs b/src/store/tests/migrate.rs index cbe35c901..8cd0c1fda 100644 --- a/src/store/tests/migrate.rs +++ b/src/store/tests/migrate.rs @@ -71,10 +71,6 @@ fn test_run_migration() { fn version(&self) -> &str { &self.version } - - fn expensive(&self) -> bool { - false - } } let migrate = gen_migrate();