diff options
author | Evan Prodromou <evan@status.net> | 2010-09-07 04:32:01 -0400 |
---|---|---|
committer | Evan Prodromou <evan@status.net> | 2010-09-07 04:32:01 -0400 |
commit | 49af35b44d7f42897d3a7b73a40a51bc3e933a1b (patch) | |
tree | cc5679ea8cfcfe4394921ae638e3f9b99827ad70 /plugins | |
parent | 7af1d4e5890d6dfbf1c85093c22b9c281c0e8f55 (diff) |
add modified column to twitter_synch_status
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/TwitterBridge/TwitterBridgePlugin.php | 2 | ||||
-rw-r--r-- | plugins/TwitterBridge/Twitter_synch_status.php | 7 |
2 files changed, 8 insertions, 1 deletions
diff --git a/plugins/TwitterBridge/TwitterBridgePlugin.php b/plugins/TwitterBridge/TwitterBridgePlugin.php index 2ac06746d..d3efb074b 100644 --- a/plugins/TwitterBridge/TwitterBridgePlugin.php +++ b/plugins/TwitterBridge/TwitterBridgePlugin.php @@ -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 diff --git a/plugins/TwitterBridge/Twitter_synch_status.php b/plugins/TwitterBridge/Twitter_synch_status.php index 69b8a780a..bcc00e648 100644 --- a/plugins/TwitterBridge/Twitter_synch_status.php +++ b/plugins/TwitterBridge/Twitter_synch_status.php @@ -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(); |