Fixed an issue where a column is renamed and then removed, then the drop SQL query takes the wrong column name. Fixes #5807.

This commit is contained in:
Aditya Toshniwal 2020-09-21 09:40:45 +05:30 committed by Akshay Joshi
parent a25e808e06
commit 553be14000
2 changed files with 6 additions and 4 deletions

View File

@ -18,4 +18,5 @@ Bug fixes
*********
| `Issue #5417 <https://redmine.postgresql.org/issues/5417>`_ - Fixed and improve API test cases for the schema diff tool.
| `Issue #5802 <https://redmine.postgresql.org/issues/5802>`_ - Remove maximum length on the password field in the server dialog.
| `Issue #5802 <https://redmine.postgresql.org/issues/5802>`_ - Remove maximum length on the password field in the server dialog.
| `Issue #5807 <https://redmine.postgresql.org/issues/5807>`_ - Fixed an issue where a column is renamed and then removed, then the drop SQL query takes the wrong column name.

View File

@ -386,8 +386,8 @@ define([
}
self.trigger('pgadmin-session:set', self, attrs);
if (!options || !options.silent) {
self.trigger('change', self, options);
if (!opts || !opts.silent) {
self.trigger('change', self, opts);
}
// Perform default validations.
@ -1132,7 +1132,8 @@ define([
} else {
(self.handler || self).trigger('pgadmin-session:removed', self, copy);
}
/* When removing the object use the original session attrs and not the changed ones */
obj.set(obj.origSessAttrs, {silent: true});
self.sessAttrs['deleted'].push(obj);
self.checkDuplicateWithModel(obj);