]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - plugins/QnA/classes/QnA_Answer.php
Merge remote-tracking branch 'upstream/master' into social-master
[quix0rs-gnu-social.git] / plugins / QnA / classes / QnA_Answer.php
index ef8bcf5b609ea3272a1a4783018144e7a120a63f..d04159f9b9375e529240ffdb49d71ed331c7830c 100644 (file)
@@ -48,6 +48,7 @@ class QnA_Answer extends Managed_DataObject
 
     public $__table = 'qna_answer'; // table name
     public $id;          // char(36) primary key not null -> UUID
+    public $uri;         // varchar(191)   not 255 because utf8mb4 takes more space
     public $question_id; // char(36) -> question.id UUID
     public $profile_id;  // int -> question.id
     public $best;        // (boolean) int -> whether the question asker has marked this as the best answer
@@ -66,24 +67,25 @@ class QnA_Answer extends Managed_DataObject
                 'id' => array(
                     'type'     => 'char',
                     'length'   => 36,
-                    'not null' => true, 'description' => 'UUID of the response'),
-                    'uri'      => array(
-                        'type'        => 'varchar',
-                        'length'      => 255,
-                        'not null'    => true,
-                        'description' => 'UUID to the answer notice'
-                    ),
-                    'question_id' => array(
-                        'type'        => 'char',
-                        'length'      => 36,
-                        'not null'    => true,
-                        'description' => 'UUID of question being responded to'
-                    ),
-                    'content'    => array('type' => 'text'), // got a better name?
-                    'best'       => array('type' => 'int', 'size' => 'tiny'),
-                    'revisions'  => array('type' => 'int'),
-                    'profile_id' => array('type' => 'int'),
-                    'created'    => array('type' => 'datetime', 'not null' => true),
+                    'not null' => true, 'description' => 'UUID of the response',
+                ),
+                'uri'      => array(
+                    'type'        => 'varchar',
+                    'length'      => 191,
+                    'not null'    => true,
+                    'description' => 'UUID to the answer notice',
+                ),
+                'question_id' => array(
+                    'type'        => 'char',
+                    'length'      => 36,
+                    'not null'    => true,
+                    'description' => 'UUID of question being responded to',
+                ),
+                'content'    => array('type' => 'text'), // got a better name?
+                'best'       => array('type' => 'int', 'size' => 'tiny'),
+                'revisions'  => array('type' => 'int'),
+                'profile_id' => array('type' => 'int'),
+                'created'    => array('type' => 'datetime', 'not null' => true),
             ),
             'primary key' => array('id'),
             'unique keys' => array(