Don't explode if QvitterNotification has not been created
thanks asterismo
This commit is contained in:
parent
e83d89e99d
commit
9214aaf541
|
@ -57,6 +57,15 @@ class QvitterNotification extends Managed_DataObject
|
||||||
|
|
||||||
static public function beforeSchemaUpdate()
|
static public function beforeSchemaUpdate()
|
||||||
{
|
{
|
||||||
|
$table = strtolower(get_called_class());
|
||||||
|
$schema = Schema::get();
|
||||||
|
try {
|
||||||
|
$schemadef = $schema->getTableDef($table);
|
||||||
|
} catch (SchemaTableMissingException $e) {
|
||||||
|
printfnq("\nTable '$table' not created yet, so nothing to do with it before Schema Update... DONE.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
printfnq("\nEnsuring no NULL values for foreign keys in QvitterNotification...");
|
printfnq("\nEnsuring no NULL values for foreign keys in QvitterNotification...");
|
||||||
// Because constraints to profile and notice table assume not null, we must
|
// Because constraints to profile and notice table assume not null, we must
|
||||||
// remove any values in these columns that are NULL (or 0), because they
|
// remove any values in these columns that are NULL (or 0), because they
|
||||||
|
|
Loading…
Reference in New Issue
Block a user