commit f4ee80e4a82971122afc6b56d40c92d5d42b311a
Author: fago <nuppla@zites.net>
Date:   Mon May 9 11:20:52 2011 +0200

     #1122812 API Change: remove entity_exportable_schema_fields() from hook_schema() implementations.

diff --git a/entity.module b/entity.module
index e254ed4..432d469 100644
--- a/entity.module
+++ b/entity.module
@@ -590,14 +590,21 @@ function _entity_modules_get_default_types($modules) {
 
 /**
  * Defines schema fields required for exportable entities.
- * To be utilized by modules defining exportable entities.
+ *
+ * Warning: Do not call this function in your module's hook_schema()
+ * implementation or update functions. It is not safe to call functions of
+ * dependencies at this point. Instead of calling the function, just copy over
+ * the content.
+ * For more details see the issue http://drupal.org/node/1122812.
  */
 function entity_exportable_schema_fields($module_col = 'module', $status_col = 'status') {
   return array(
     $status_col => array(
       'type' => 'int',
       'not null' => TRUE,
-      'default' => ENTITY_CUSTOM,
+      // Set the default to ENTITY_CUSTOM without using the constant as it is
+      // not safe to use it at this point.
+      'default' => 0x01,
       'size' => 'tiny',
       'description' => 'The exportable status of the entity.',
     ),
diff --git a/tests/entity_test.install b/tests/entity_test.install
index 0869158..55ce574 100644
--- a/tests/entity_test.install
+++ b/tests/entity_test.install
@@ -112,7 +112,22 @@ function entity_test_schema() {
         'description' => 'A serialized array of additional data related to this entity_test type.',
         'merge' => TRUE,
       ),
-    ) + entity_exportable_schema_fields(),
+      'status' => array(
+        'type' => 'int',
+        'not null' => TRUE,
+        // Set the default to ENTITY_CUSTOM without using the constant as it is
+        // not safe to use it at this point.
+        'default' => 0x01,
+        'size' => 'tiny',
+        'description' => 'The exportable status of the entity.',
+      ),
+      'module' => array(
+        'description' => 'The name of the providing module if the entity has been defined in code.',
+        'type' => 'varchar',
+        'length' => 255,
+        'not null' => FALSE,
+      ),
+    ),
     'primary key' => array('id'),
     'unique keys' => array(
       'name' => array('name'),
