]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - plugins/Sample/SamplePlugin.php
IMPORTANT: Making prev. Memcached_DataObject working again with schemaDef
[quix0rs-gnu-social.git] / plugins / Sample / SamplePlugin.php
index 5c34d10bd1664c3377a04b450d1fad36c5f81af4..f2d333bbcb2c0f826d40b36bfda7d32b6c788b38 100644 (file)
@@ -170,23 +170,7 @@ class SamplePlugin extends Plugin
         $schema = Schema::get();
 
         // For storing user-submitted flags on profiles
-
-        $schema->ensureTable('user_greeting_count',
-            array(
-                'fields' => array(
-                    'user_id' => array('type' => 'int', 'not null' => true),
-                    'greeting_count' => array('type' => 'int'),
-                ),
-                'primary key' => array('user_id'),
-                'foreign keys' => array(
-                    // Not all databases will support foreign keys, but even
-                    // when not enforced it's helpful to include these definitions
-                    // as documentation.
-                    'user_greeting_count_user_id_fkey' => array('user', array('user_id' => 'id')),
-                ),
-            )
-        );
-
+        $schema->ensureTable('user_greeting_count', User_greeting_count::schemaDef());
         return true;
     }