IMPORTANT: Making prev. Memcached_DataObject working again with schemaDef

Lots of the Memcached_DataObject classes stopped working when upgraded to
Managed_DataObject because they lacked schemaDef().

I have _hopefully_ made it so that all the references to the table uses
each class' schemaDef, rather than the more manual ColumnDef stuff. Not
all plugins have been tested thoroughly yet.

NOTE: This is applied with getKV calls instead of staticGet, as it was
important for PHP Strict Standards compliance to avoid calling the non-
static functions statically. (unfortunately DB and DB_DataObject still do
this within themselves...)
This commit is contained in:
Mikael Nordfeldth
2013-08-19 17:08:18 +02:00
parent b1465a7559
commit 3a7261f70a
42 changed files with 453 additions and 1332 deletions

View File

@@ -404,28 +404,10 @@ class TwitterBridgePlugin extends Plugin
// For saving the last-synched status of various timelines
// home_timeline, messages (in), messages (out), ...
$schema->ensureTable('twitter_synch_status',
array(new ColumnDef('foreign_id', 'bigint', null,
false, 'PRI'),
new ColumnDef('timeline', 'varchar', 255,
false, 'PRI'),
new ColumnDef('last_id', 'bigint', null, // XXX: check for PostgreSQL
false),
new ColumnDef('created', 'datetime', null,
false),
new ColumnDef('modified', 'datetime', null,
false)));
$schema->ensureTable('twitter_synch_status', Twitter_sync_status::schemaDef());
// For storing user-submitted flags on profiles
$schema->ensureTable('notice_to_status',
array(new ColumnDef('notice_id', 'integer', null,
false, 'PRI'),
new ColumnDef('status_id', 'bigint', null, // XXX: check for PostgreSQL
false, 'UNI'),
new ColumnDef('created', 'datetime', null,
false)));
$schema->ensureTable('notice_to_status', Notice_to_status::schemaDef());
return true;
}