fix(postgres): add pg compatible query for copying comm_date#35488
fix(postgres): add pg compatible query for copying comm_date#35488ankush merged 2 commits intofrappe:developfrom
Conversation
|
Can't be done via qb? 👀 |
Possible tbf, would still need to use multisql though because the QB is not respecting Postgres Behavior i.e. using |
This happens in pypika itself, or because of our changes? |
Seemingly an inherent constraint of Pypika itself, it does not seem to account for such "rules" of Postgres |
|
We gave enough tries to PyPika, it's just not supported 😬 |
frappe/core/doctype/communication_link/patches/copy_communication_date_to_link.py
Outdated
Show resolved
Hide resolved
9195021 to
b3e9a73
Compare
|
This test actions needs an update |
|
Thanks — I hit the same failure during After this patch succeeds, my migration run then fails on a separate patch with the same class of root cause (MariaDB-specific DDL):
So the linkage is: once Postgres can proceed past I have a minimal fix ready that preserves the existing click output/behavior and switches to: |
@ili-ad feel free to raise a PR for the same. Thank You. |
@AarDG10 PR up as requested: #35636 This addresses the next Postgres migration blocker after |
|
@Mergifyio update |
✅ Branch has been successfully updated |
…-35488 fix(postgres): add pg compatible query for copying comm_date (backport #35488)
# [15.95.0](v15.94.1...v15.95.0) (2026-01-06) ### Bug Fixes * add boolean labels for filter display in print/pdf ([35ae63f](35ae63f)) * add compatibility shim for old `frappe.pulse.utils` imports ([82168fd](82168fd)) * check len(item) before replace "\\n" with "\n" (backport [#35571](#35571)) ([#35665](#35665)) ([a9cfae6](a9cfae6)) * correct boolean label handling for filter display ([d366b13](d366b13)) * **data import:** consider fieldname if label is null for col_build ([e2cc64f](e2cc64f)) * description of the permission types ([#35599](#35599)) ([952a61b](952a61b)) * **desk:** guard owner/modified_by access in update_user_info ([#35581](#35581)) ([#35582](#35582)) ([a117b2b](a117b2b)), closes [#35557](#35557) * Fetch user info for owner, modified_by and versions ([#35557](#35557)) ([#35558](#35558)) ([d5575f0](d5575f0)) * fix merge conflicts ([95ec208](95ec208)) * handle precision correctly when decimal string is empty ([#35526](#35526)) ([218d6d6](218d6d6)) * handle string input for bulk_capture events ([d2b84bf](d2b84bf)) * invalid import ([01c550e](01c550e)) * is_enabled is not updated on system settings change ([7eaa22f](7eaa22f)) * **kanban:** ensure that we don't try to access [0] of an empty list ([#35680](#35680)) ([#35682](#35682)) ([95bcc4a](95bcc4a)) * Log errors for bulk action update ([#35563](#35563)) ([6cf4284](6cf4284)) * **login:** don't let button text stuck at "Verifying" if you get rate limited ([#35671](#35671)) ([#35678](#35678)) ([a24f79b](a24f79b)), closes [#35402](#35402) * **oauth2:** introspect_token requires `token` ([#35647](#35647)) ([#35668](#35668)) ([d06c428](d06c428)) * **postgres:** add pg compatible query for copying comm_date from comm to comm_link ([#35488](#35488)) ([8cef157](8cef157)) * **postgres:** drop_index_if_exists uses DROP INDEX IF EXISTS ([#35636](#35636)) ([7ba317f](7ba317f)) * preserve old behaviour ([55b5173](55b5173)) * prevent adding of grid rows on tab press when cannot_add_rows is set ([#35570](#35570)) ([a43d3b8](a43d3b8)) * prevent empty filter export in query report ([#35357](#35357)) ([#35403](#35403)) ([10b8222](10b8222)) * Remove DNT based check ([#35588](#35588)) ([#35591](#35591)) ([f94f28a](f94f28a)) * remove filter to maintain previous behaviour ([#35626](#35626)) ([#35629](#35629)) ([3325871](3325871)) * resolve merge conflicts ([#35609](#35609)) ([1fccdbf](1fccdbf)) * **setup_wizard:** don't update all users ([#35679](#35679)) ([#35691](#35691)) ([62d7985](62d7985)), closes [#33360](#33360) * skip non-html object types (backport [#24524](#24524)) ([#35632](#35632)) ([ed8b735](ed8b735)) * Tree Report buttons state not matching initial_depth ([#34505](#34505)) ([#35435](#35435)) ([587ad14](587ad14)) * update datetime import for timezone compatibility ([cacb9c6](cacb9c6)) * update get_applied_filters to handle boolean labels correctly ([#35614](#35614)) ([cd36d52](cd36d52)) * use reportview get_count for client get_count ([#35657](#35657)) ([#35694](#35694)) ([6cdb7b6](6cdb7b6)) ### Features * add test cases ([6c7d669](6c7d669)) * import custom DocType Links on app install/migrate ([#34516](#34516)) ([#35612](#35612)) ([ab5c05d](ab5c05d)) * override custom report print format from report settings (backport [#35445](#35445)) ([#35603](#35603)) ([a1b01e6](a1b01e6)), closes [#35606](#35606) * whitelist capture methods for client side events ([30f59b5](30f59b5)) ### Performance Improvements * Reduce memory usage of exif stripping ([#35566](#35566)) ([#35568](#35568)) ([79715a7](79715a7))
| """, | ||
| frappe.db.multisql( | ||
| { | ||
| "mariadb": """ |
There was a problem hiding this comment.
Thanks @sagarvora for the catch , working on it
Problem:
fix(Postgres): This PR focusses on adding a Postgres compatible query in
copy_communication_date_to_link.pyand fixes #35281 . Previously the query was very MariaDB specific, this PR adds multi-db support for this feature for Postgres accounting for rules enforced by Postgres i.e. (Update with Limit (Not Allowed!), Update with Join (Not Allowed!). This PR is also a step forward towards resolving #21613.Before:

After:
Migration works successfully
fixes #35281