def test_migrate_prefix(self) -> None:
        """Test that database migration works across different prefixes."""

        db_types = ["sqlite_file"]  # , "postgres", "mysql", "sqlite_memory"
        # sqlite_memory might have problems with multithreading of tests

        for db_type in db_types:
            with self.subTest(msg=f"prefix for {db_type}"):
                with clean_db(db_type, table_prefix="test_prior_") as db_prior:
                    _test_db_consistency(self, db_prior)

                    # Migrate the database.
                    with clean_db(
                        db_type, table_prefix="test_post_"
                    ) as db_post:
                        db_post.migrate_database(prior_prefix="test_prior_")

                        # Check that we have the correct table names.
                        with db_post.engine.begin() as conn:
                            df = pd.read_sql(
                                "SELECT * FROM test_post_alembic_version", conn
                            )
                            print(df)

                        _test_db_consistency(self, db_post)
Test that database migration works across different prefixes.
tests/integration/test_database.py