class_docstr: Tests for backward compatibility between Oríon versions.
class_docstr_tok: ["Tests","for","backward","compatibility","between","Or\u00edon","versions","."]
docstr: Verify db upgrade was successful
docstr_tok: ["Verify","db","upgrade","was","successful"]
code: def test_db_upgrade(self):
      """Verify db upgrade was successful"""
      storage = build_storage()
  
      index_info = storage._db.index_information("experiments")
      assert {
          key for key, is_unique in index_info.items() if is_unique
      } == {
          "_id_",
          "name_1_version_1",
      }
  
      experiments = storage.fetch_experiments({})
      assert "version" in experiments[0]
  
      trials = storage.fetch_trials(uid=experiments[0]["_id"])
      for trial in trials:
          assert trial.id_override is not None
          trial_2 = storage.get_trial(
              uid=trial.id, experiment_uid=experiments[0]["_id"]
          )
          assert trial == trial_2
  
imports: import os
  import shutil
  import subprocess
  import pytest
  from pymongo import MongoClient
  import orion.core.cli
  import orion.core.io.experiment_builder
  from orion.client import create_experiment
  from orion.core.io.database import database_factory
  from orion.storage.base import storage_factory
label_desc: Use image node_id 1 for calling the TestBackwardCompatibility obj's underlying member method code with example usage: obj.test_db_upgrade() without return types