- $sv = new Schema_version();
- $sv->table_name = $table;
- $sv->checksum = $checksum;
- $sv->modified = common_sql_now();
- if (isset($this->checksums[$table])) {
- $sv->update();
- } else {
- $sv->insert();
+ PEAR::pushErrorHandling(PEAR_ERROR_EXCEPTION);
+ try {
+ $sv = new Schema_version();
+ $sv->table_name = $table;
+ $sv->checksum = $checksum;
+ $sv->modified = common_sql_now();
+ if (isset($this->checksums[$table])) {
+ $sv->update();
+ } else {
+ $sv->insert();
+ }
+ } catch (Exception $e) {
+ // no dice!
+ common_debug("Possibly schema_version table doesn't exist yet.");