'Create a database fixture.
:param version: Max version to sync to (or None for current)
:param database: The type of database, \'main\' or \'api\''

def __init__(self, version, database='main'):

    super(DatabaseAtVersion, self).__init__()
    self.database = database
    self.version = version
    if (database == 'main'):
        self.get_engine = session.get_engine
    elif (database == 'api'):
        self.get_engine = session.get_api_engine
