The BlobMigrationRecord Class

The BlobMigrationRecord class stores the results of a blob migration.

BlobMigrationRecord is provided by the google.appengine.ext.blobstore module.

  1. Introduction
  2. Class methods:
  3. Instance properties:


During the migration of an application from Master/Slave to HRD in which blobs are copied from the Master/Slave app to the new HRD app, new blob keys are assigned to the blobs copied to the new app. The BlobMigrationRecord class stores the results of this blob migration. In particular, for each blob, it contains the mapping of the old blob key used in the original app and the new blob key for that blob in the new app.

After the migration, you need to use this class if you have stored blob keys inside serialized data within the Datastore. (Those serialized keys are not updated automatically by the migration tool.) You need to replace the old blob key for each blob with the corresponding new blob key using BlobMigrationRecord.get_new_blob_key(), which returns the new blob key corresponding to the old one supplied to the method

Class Methods

The BlobMigrationRecord class has the following class methods:

BlobMigrationRecord.get_by_blob_key (old_blob_key)

Returns a BlobMigrationRecord object that represents the blob migration data for the given old blob key. The use of this method is optional. You don't need to use this method to get new blob keys that map to the old blob keys&emdash;you can use BlobMigrationRecord.get_new_blob_key() directly.


A BlobKey value.
BlobMigrationRecord.get_new_blob_key (old_blob_key)

Returns the new blob key that maps to the supplied old blob key.


The BlobKey for a blob prior to a blob migration.
Returns the kind (blobstore.BLOB_MIGRATION_KIND).

Instance Properties

A BlobMigrationRecord instance has one instance property, new_blob_ref which is a blob reference containing the new blob key.

Blob reference containing the new blob key value corresponding to the BlobMigrationRecord instance's old blob key value.