]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - plugins/GNUsocialPhotos/classes/gnusocialphoto.php
GNU Social extensions fixes (please read note)
[quix0rs-gnu-social.git] / plugins / GNUsocialPhotos / classes / gnusocialphoto.php
index 6e9daac2ed8704c1ae2e82ba8a380059134ea190..9fbe5a58aa4282b2adac8680e0f9cb0a235c6dbe 100644 (file)
@@ -60,7 +60,7 @@ class GNUsocialPhoto extends Managed_DataObject
     {
         return array(
             'fields' => array(
-                'id' => array('type' => 'int', 'not null' => true, 'description' => 'Unique ID for Photo'),
+                'id' => array('type' => 'serial', 'not null' => true, 'description' => 'Unique ID for Photo'),
                 'notice_id' => array('type' => 'int', 'not null' => true, 'description' => 'Notice ID for the related notice'),
                 'album_id' => array('type' => 'int', 'not null' => true, 'description' => 'The parent album ID'),
                 'uri' => array('type' => 'varchar', 'not null' => true, 'length' => 255, 'description' => 'unique address for this photo'),
@@ -72,7 +72,8 @@ class GNUsocialPhoto extends Managed_DataObject
             ),
             'primary key' => array('id'),
             'unique keys' => array(
-                'gnusocialphoto_uri' => array('uri'),
+                'gnusocialphoto_id_key' => array('notice_id'),
+                'gnusocialphoto_uri_key' => array('uri'),
             ),
             'foreign keys' => array(
                 'gnusocialphoto_notice_id_fkey' => array('notice', array('notice_id' => 'id')),