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
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
'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
);
}
$tss->user_id = $user_id;
$tss->timeline = $timeline;
$tss->last_id = $last_id;
+ $tss->created = common_sql_now();
+ $tss->modified = $tss->created;
$tss->insert();
$orig = clone($tss);
- $tss->last_id = $last_id;
+ $tss->last_id = $last_id;
+ $tss->modified = common_sql_now();
$tss->update();