def initialize(self, version, force=False):
        """
        Initialize the manifest document in the given datamodel

        :param version: Actual version of the datamodel
        :param force: Replace manifest if it already exists
        """
        _check_version_format(version)
        if not force and self.collection.find_one({'_id': 'manifest'}):
            raise DatamodelManifestError("Datamodel has already a manifest")
        manifest = self.collection.update({'_id': 'manifest'}, {
            '_id': 'manifest', 'version': version, 'history': [
                {'timestamp': datetime.utcnow(), 'version': version,
                 'reason': 'Initialize version'}
            ]}, upsert=True)
        return manifest
def initialize ( self , version , force = False ) : _check_version_format ( version ) if not force and self . collection . find_one ( { '_id' : 'manifest' } ) : raise DatamodelManifestError ( "Datamodel has already a manifest" ) manifest = self . collection . update ( { '_id' : 'manifest' } , { '_id' : 'manifest' , 'version' : version , 'history' : [ { 'timestamp' : datetime . utcnow ( ) , 'version' : version , 'reason' : 'Initialize version' } ] } , upsert = True ) return manifest
Initialize the manifest document in the given datamodel

        :param version: Actual version of the datamodel
        :param force: Replace manifest if it already exists