public inbox for [email protected]
help / color / mirror / Atom feed[pgAdmin][RM5807] Removed columns use modified name in generated script
2+ messages / 2 participants
[nested] [flat]
* [pgAdmin][RM5807] Removed columns use modified name in generated script
@ 2020-09-17 09:58 Aditya Toshniwal <[email protected]>
0 siblings, 1 reply; 2+ messages in thread
From: Aditya Toshniwal @ 2020-09-17 09:58 UTC (permalink / raw)
To: pgadmin-hackers
Hi Hackers,
If a column is renamed and then removed, then drop SQL query takes the
renamed column and not the original one.
Attached is the patch to fix this issue.
--
Thanks,
Aditya Toshniwal
pgAdmin hacker | Sr. Software Engineer | *edbpostgres.com*
<http://edbpostgres.com;
"Don't Complain about Heat, Plant a TREE"
Attachments:
[application/octet-stream] RM5807.patch (966B, 3-RM5807.patch)
download | inline diff:
diff --git a/web/pgadmin/browser/static/js/datamodel.js b/web/pgadmin/browser/static/js/datamodel.js
index cd74982ec..ce1a4706a 100644
--- a/web/pgadmin/browser/static/js/datamodel.js
+++ b/web/pgadmin/browser/static/js/datamodel.js
@@ -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);
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: [pgAdmin][RM5807] Removed columns use modified name in generated script
@ 2020-09-21 05:36 Akshay Joshi <[email protected]>
parent: Aditya Toshniwal <[email protected]>
0 siblings, 0 replies; 2+ messages in thread
From: Akshay Joshi @ 2020-09-21 05:36 UTC (permalink / raw)
To: Aditya Toshniwal <[email protected]>; +Cc: pgadmin-hackers
Thanks, patch applied.
On Thu, Sep 17, 2020 at 3:29 PM Aditya Toshniwal <
[email protected]> wrote:
> Hi Hackers,
>
> If a column is renamed and then removed, then drop SQL query takes the
> renamed column and not the original one.
> Attached is the patch to fix this issue.
>
> --
> Thanks,
> Aditya Toshniwal
> pgAdmin hacker | Sr. Software Engineer | *edbpostgres.com*
> <http://edbpostgres.com;
> "Don't Complain about Heat, Plant a TREE"
>
--
*Thanks & Regards*
*Akshay Joshi*
*pgAdmin Hacker | Sr. Software Architect*
*EDB Postgres <http://edbpostgres.com>*
*Mobile: +91 976-788-8246*
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2020-09-21 05:36 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-09-17 09:58 [pgAdmin][RM5807] Removed columns use modified name in generated script Aditya Toshniwal <[email protected]>
2020-09-21 05:36 ` Akshay Joshi <[email protected]>
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox