New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update hook 1100 (7100) fails. #6
Comments
PR up for review @Graham-72 |
The PR was a straight adaptation from the d.org patch, but there seems to be something wrong with it: https://www.drupal.org/node/2846887#comment-11931133 ...pending reply from the d.org maintainers. As for your concerns:
...(once we get a reply from the d.org maintainers) I think that we should be checking whether the function oauth_common_update_1101() {
$tables = array('oauth_common_provider_consumer', 'oauth_common_token');
$unprocessed_schema = backdrop_get_schema_unprocessed('oauth_common');
foreach ($tables as $table) {
if (db_field_exists($table, 'callback_url')) {
if (!$unprocessed_schema[$table]['fields']['callback_url']['default']) {
db_drop_field($table, 'callback_url');
}
}
if (!db_field_exists($table, 'callback_url')) {
$spec = array(
'description' => 'Callback URL.',
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
);
db_add_field($table, 'callback_url', $spec);
}
}
} |
@klonos I think your suggestion above for update 1101 is a good one and I would like to include it in the BD version of the module to make sure that the schema for both tables are correct and updated accordingly. I have now made a commit for issue #2 that gets the code fully updated and would like to include your update 1101 to make sure that any existing installation gets correctly updated. I note that in D7 there is a more recent issue about this at https://www.drupal.org/node/2852011 and this would seem to support your suggestion there. I have tried to follow through the D7 repository to understand what amendments have been included because until now I don't seem to have picked them all up in this port to BD. Hopefully this update in BD will correct any omissions from earlier releases. |
This is the respective issue for Update hook 7100 fails [#2846887] in the d.org queue that was fixed with http://cgit.drupalcode.org/oauth/commit/?id=e1558f5
Not sure, but I believe it applies to our codebase too.
The text was updated successfully, but these errors were encountered: