You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: migration_persistence_tests.rs
    path of file: ./repos/prisma-engines/schema-engine/sql-migration-tests/tests/migrations
    
    the code of the file until where you have to start completion: use chrono::Duration;
use pretty_assertions::assert_eq;
use sql_migration_tests::test_api::*;

#[test_connector]
fn starting_a_migration_works(api: TestApi) {
    let persistence = api.migration_persistence();

    tok(persistence.initialize(None)).unwrap();

    let script = "CREATE ENUM MyBoolean ( \"TRUE\", \"FALSE\" )";

    let id = tok(persistence.record_migration_started("initial_migration", script)).unwrap();

    let migrations = tok(persistence.list_migrations()).unwrap()
    
fn finishing_a_migration_works(api: TestApi) {
    let persistence = api.migration_persistence();

    tok(persistence.initialize(None)).unwrap();

    let script = "CREATE ENUM MyBoolean ( \"TRUE\", \"FALSE\" )";

    let id = tok(persistence.record_migration_started("initial_migration", script)).unwrap();
    tok(persistence.record_migration_finished(&id)).unwrap();

    let migrations = tok(persistence.list_migrations()).unwrap().unwrap();

    assert_eq!(migrations.len(), 1);

    let first_migration = &migrations[0];

    assert_eq!(first_migration.id, id);
    assert_eq!(
        first_migration.checksum,
        "e0c9674d3b332d71b8bc304aae5b7b8a8bb8ec720e07072429fb20d8cc69a864"
    );
    assert_eq!(first_migration.migration_name, "initial_migration");
    assert_eq!(first_migration.logs.as_deref(), None);
    assert_eq!(first_migration.rolled_back_at, None);
    assert_eq!(first_migration.applied_steps_count, 0);

    let duration_since_started_at = chrono::Utc::now().signed_duration_since(first_migration.started_at);
    let duration_between_started_at_and_finished_at =
        chrono::Utc::now().signed_duration_since(first_migration.started_at);

    assert!(duration_since_started_at >= Duration::seconds(0));
    assert!(duration_since_started_at < Duration::seconds(10));
    assert!(duration_between_started_at_and_finished_at >= Duration::seconds(0));
    assert!(duration_between_started_at_and_finished_at < Duration::seconds(10));
}