field_exists(_tbl('entry'), 'enable_registrant_limit')) { $sql = "ALTER TABLE " . _tbl('entry') . " "; if ($dbsys == 'pgsql') { $sql .= "RENAME COLUMN enable_registrant_limit TO registrant_limit_enabled"; } else { $sql .= "CHANGE enable_registrant_limit registrant_limit_enabled tinyint DEFAULT 1 NOT NULL"; } $upgrade_handle->command($sql); } elseif (!$upgrade_handle->field_exists(_tbl('entry'), 'registrant_limit_enabled')) { $message = "Something is wrong with the table structure. Neither the column " . "'enable_registrant_limit' nor the column 'registrant_limit_enabled' exist. " . "Please raise an MRBS Sourceforge Support Request ticket."; throw new \Exception($message); }