]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - plugins/GNUsocialPhotos/GNUsocialPhotosPlugin.php
IMPORTANT: Making prev. Memcached_DataObject working again with schemaDef
[quix0rs-gnu-social.git] / plugins / GNUsocialPhotos / GNUsocialPhotosPlugin.php
index f187a22a775b8619b93242c8d92e39b2e5ee53ca..3a7e8822364fe200a3671931fd9d9cf6c842dd8c 100644 (file)
@@ -71,20 +71,8 @@ class GNUsocialPhotosPlugin extends Plugin
     function onCheckSchema()
     {
         $schema = Schema::get();
-        $schema->ensureTable('GNUsocialPhoto',
-                                array(new ColumnDef('id', 'int(11)', null, false, 'PRI', null, null, true),
-                                      new ColumnDef('notice_id', 'int(11)', null, false),
-                                      new ColumnDef('album_id', 'int(11)', null, false),
-                                      new ColumnDef('uri', 'varchar(512)', null, false),
-                                      new ColumnDef('thumb_uri', 'varchar(512)', null, false),
-                                      new ColumnDef('title', 'varchar(512)', null, false),
-                                      new ColumnDef('photo_description', 'text', null, false)));
-        $schema->ensureTable('GNUsocialPhotoAlbum',
-                                array(new ColumnDef('album_id', 'int(11)', null, false, 'PRI', null, null, true),
-                                      new ColumnDef('profile_id', 'int(11)', null, false),
-                                      new ColumnDef('album_name', 'varchar(256)', null, false),
-                                      new ColumnDef('album_description', 'text', null, false)));
-                                          
+        $schema->ensureTable('GNUsocialPhoto', GNUsocialPhoto::schemaDef());
+        $schema->ensureTable('GNUsocialPhotoAlbum', GNUsocialPhotoAlbum::schemaDef());
     }
 
     function onRouterInitialized($m)