]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - classes/Confirm_address.php
Added type-hint for StartShowNoticeFormData hook
[quix0rs-gnu-social.git] / classes / Confirm_address.php
index f8b5b21124c9f03edaba9406e7a618eff6a7b813..f0748b888fe5a21779b5547d313370617350d13f 100644 (file)
@@ -3,7 +3,7 @@
  * Table Definition for confirm_address
  */
 
-class Confirm_address extends Managed_DataObject 
+class Confirm_address extends Managed_DataObject
 {
     public $__table = 'confirm_address';                 // table name
     public $code;                            // varchar(32)  primary_key not_null
@@ -11,22 +11,22 @@ class Confirm_address extends Managed_DataObject
     public $address;                         // varchar(191)   not_null   not 255 because utf8mb4 takes more space
     public $address_extra;                   // varchar(191)   not_null   not 255 because utf8mb4 takes more space
     public $address_type;                    // varchar(8)   not_null
-    public $claimed;                         // datetime()  
-    public $sent;                            // datetime()  
-    public $modified;                        // timestamp()   not_null default_CURRENT_TIMESTAMP
+    public $claimed;                         // datetime()
+    public $sent;                            // datetime()
+    public $modified;                        // datetime()   not_null default_CURRENT_TIMESTAMP
 
     public static function schemaDef()
     {
         return array(
             'fields' => array(
                 'code' => array('type' => 'varchar', 'length' => 32, 'not null' => true, 'description' => 'good random code'),
-                'user_id' => array('type' => 'int', 'not null' => true, 'description' => 'user who requested confirmation'),
+                'user_id' => array('type' => 'int', 'default' => 0, 'description' => 'user who requested confirmation'),
                 'address' => array('type' => 'varchar', 'length' => 191, 'not null' => true, 'description' => 'address (email, xmpp, SMS, etc.)'),
                 'address_extra' => array('type' => 'varchar', 'length' => 191, 'description' => 'carrier ID, for SMS'),
                 'address_type' => array('type' => 'varchar', 'length' => 8, 'not null' => true, 'description' => 'address type ("email", "xmpp", "sms")'),
                 'claimed' => array('type' => 'datetime', 'description' => 'date this was claimed for queueing'),
                 'sent' => array('type' => 'datetime', 'description' => 'date this was sent for queueing'),
-                'modified' => array('type' => 'timestamp', 'not null' => true, 'description' => 'date this record was modified'),
+                'modified' => array('type' => 'datetime', 'not null' => true, 'default' => 'CURRENT_TIMESTAMP', 'description' => 'date this record was modified'),
             ),
             'primary key' => array('code'),
             'foreign keys' => array(