]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
add modified column to twitter_synch_status
authorEvan Prodromou <evan@status.net>
Tue, 7 Sep 2010 08:32:01 +0000 (04:32 -0400)
committerEvan Prodromou <evan@status.net>
Tue, 7 Sep 2010 08:32:01 +0000 (04:32 -0400)
plugins/TwitterBridge/TwitterBridgePlugin.php
plugins/TwitterBridge/Twitter_synch_status.php

index 2ac06746de4d8a00cfa36d4cd158b7b8df6a9a7d..d3efb074bd54e94830b6cf2b2ef0003754e82923 100644 (file)
@@ -390,6 +390,8 @@ class TwitterBridgePlugin extends Plugin
                                    new ColumnDef('last_id', 'bigint', null, // XXX: check for PostgreSQL
                                                  false),
                                    new ColumnDef('created', 'datetime', null,
+                                                 false),
+                                   new ColumnDef('modified', 'datetime', null,
                                                  false)));
 
         // For storing user-submitted flags on profiles
index 69b8a780ad165c4ee6abb5cc72f5ed4902d782b8..bcc00e648478f0bee3253730674dc2b415847621 100644 (file)
@@ -56,6 +56,7 @@ class Twitter_synch_status extends Memcached_DataObject
     public $timeline;                        // varchar(255)  primary_key not_null
     public $last_id;                         // bigint not_null
     public $created;                         // datetime not_null
+    public $modified;                        // datetime not_null
 
     /**
      * Get an instance by key
@@ -87,6 +88,7 @@ class Twitter_synch_status extends Memcached_DataObject
                      'timeline' => DB_DATAOBJECT_STRING + DB_DATAOBJECT_NOTNULL,
                      'last_id' => DB_DATAOBJECT_INT + DB_DATAOBJECT_NOTNULL,
                      'created' => DB_DATAOBJECT_STR + DB_DATAOBJECT_DATE + DB_DATAOBJECT_TIME + DB_DATAOBJECT_NOTNULL
+                     'modified' => DB_DATAOBJECT_STR + DB_DATAOBJECT_DATE + DB_DATAOBJECT_TIME + DB_DATAOBJECT_NOTNULL
                      );
     }
 
@@ -164,6 +166,8 @@ class Twitter_synch_status extends Memcached_DataObject
             $tss->user_id  = $user_id;
             $tss->timeline = $timeline;
             $tss->last_id  = $last_id;
+            $tss->created  = common_sql_now();
+            $tss->modified = $tss->created;
 
             $tss->insert();
 
@@ -173,7 +177,8 @@ class Twitter_synch_status extends Memcached_DataObject
 
             $orig = clone($tss);
 
-            $tss->last_id = $last_id;
+            $tss->last_id  = $last_id;
+            $tss->modified = common_sql_now();
 
             $tss->update();