Commit graph

864 commits

Author SHA1 Message Date
gruener
8a2aa92389
fix: Fixes mariadb orm to return list instead of tuple as the typisat… (#27179)
* fix: Fixes mariadb orm to return list instead of tuple as the typisation suggests it

* fix: inverted fix for pg: Expect tuple as data_type for _transform_result

* fix: Fixed failing upstream spec due to data_type change
2024-08-09 09:27:07 +05:30
Philipp Gruener
e2a1c506fe fix: Added adjustments 2024-07-20 13:30:35 +02:00
Philipp Gruener
2e0ca7d3a7 fix: simplified functional call to iterator (semgrep) 2024-07-04 23:25:55 +02:00
gruener
2fce72bbad
Merge branch 'frappe:develop' into bugfix/postgres_schema_support 2024-07-04 23:16:02 +02:00
Philipp Gruener
d3591c7170 fix: Added missing ruff adjustments 2024-07-04 23:13:14 +02:00
Philipp Gruener
afd95691e9 fix: Fixed schema isolation/support for postgres connectivity. 2024-07-04 22:40:47 +02:00
Akhil Narang
bb945ab96b
fix: remove mariadb sandbox mode comment before restoring backups
Reference: https://mariadb.org/mariadb-dump-file-compatibility-change/

Newer versions of MariaDB include a line in the dumps that break restoring on older versions
This doesn't allow people to restore newer dumps onto Frappe Cloud

For now just remove the line to allow any backups to be restored anywhere

Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-06-26 16:40:25 +05:30
Ankush Menat
fb27368a53
feat: Link fields with UUID datatype in DB (#26625)
Link fields that refer to doctypes with UUID naming will also be UUID.
2024-05-31 09:17:09 +00:00
Ankush Menat
a1bd916cfa
docs: typo in db.delete (#26464) 2024-05-17 07:32:23 +00:00
Ankush Menat
5de5e25df6
fix: datetime comparison in QB (#26364)
closes https://github.com/frappe/frappe/issues/26363
2024-05-09 10:19:27 +00:00
Kevin Shenk
cd50b025d5
fix: QB name in error message (#26345)
"Query Engine" wording made the edited error message ambiguous, since the docs all refer to this feature as Query Builder
2024-05-07 11:39:28 +05:30
Rutwik Hiwalkar
ba2715582b
fix: init db conn for unbuffered cursor if not set (#26220)
* fix: init db conn for unbuffered cursor if not set

* chore: check conn and not cursor

---------

Co-authored-by: Ankush Menat <ankushmenat@gmail.com>
2024-04-30 12:54:12 +00:00
Nahuel Operto
c0e779998d
fix: lstrip for query writes detection (#26180) 2024-04-30 18:09:22 +05:30
Ankush Menat
dd82ab415c
fix: add missing impl for is_column_missing (#26225)
I removed it assuming it's already implemented in actual classes, but
it's alias for is_missing_column.
2024-04-29 16:46:12 +00:00
Ankush Menat
c1bf152b89
fix: handle interface error during report timeout (#25893) 2024-04-10 06:57:36 +00:00
Ankush Menat
c14e5cc152
fix: index sort field by default in tabFile (#25853) 2024-04-08 16:28:21 +05:30
Ankush Menat
eef9c2c8cc refactor!: Better Integer handling
- Remove length: it makes no difference, it's for ZEROFILL only.
- Switch to tinyint for checkboxes in mysql and smallint on postgres.
- Use `int` instead of `bigint` by default.
2024-04-06 11:11:29 +05:30
Ankush Menat
a6732a0e12
fix: set db name in filter (#25732) 2024-03-29 16:06:02 +00:00
Ankush Menat
8c6e3a56c6 feat: UUID name implementation for postgres 2024-03-29 21:02:54 +05:30
Ankush Menat
8cc6c31f0e fix: Allow switching between UUID and VARCHAR
- VARCHAR -> UUID = Only allowed when table is empty for now
- UUID -> VARCHAR is not lossy, can be done anytime.
2024-03-29 19:02:28 +05:30
Ankush Menat
6c79a13641 feat: UUID naming support 2024-03-29 19:02:28 +05:30
Akhil Narang
ae34b12ce8
Merge pull request #22548 from blaggacao/feat/uds
feat: support unix domain sockets
2024-03-29 18:11:01 +05:30
Akhil Narang
0d3b2499fc
fix: don't use frappe.flags for mariadb_user_host_login_scope
This gets reset whenever we call `frappe.init()` again

Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-03-29 16:57:04 +05:30
Ankush Menat
de48dc2c04
fix: db explain (#25724)
This broke from some recent changes.

It's just a wrapper, so probably no one uses it.
Anyway, fixed and added test to prevent it.
2024-03-29 10:23:12 +00:00
David
39d4318a27
feat: enable db socket connection 2024-03-29 10:29:50 +01:00
David
6eb1607c0a
refactor: name and explain user host login scope flag for mariadb 2024-03-29 10:26:49 +01:00
Akhil Narang
4b2fde1d8f
fix: check if rollback callback is defined
Don't raise exceptions where a simple print() will suffice
Print exception before prompting for rollback

Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-03-29 12:00:25 +05:30
Ankush Menat
be579f9a8d
fix: sql_ddl - always ensure commit (#25704) 2024-03-28 13:13:55 +00:00
Ankush Menat
23204c0c05
Merge pull request #25256 from ankush/no_commit_doc_events
fix: disable transaction commits during doc events
2024-03-28 12:28:12 +05:30
Ankush Menat
e5a64fd50c test: transaction control 2024-03-28 11:58:38 +05:30
Ankush Menat
f66b23b96d fix: handle nested event calls
Treat disable_transaction_control as a stack incr/decr when moving in
and out of context.
2024-03-28 11:27:24 +05:30
Ankush Menat
3fea2726f3 fix: modified index sync 2024-03-27 23:56:03 +05:30
Ankush Menat
67bcda333e
fix: auto add modified index when sort_field is set to it (#25686)
This is 2nd most common sort order, so we should support adding index
for it automatically.

Not quite sure on generalizing this behaviour *YET*
2024-03-27 14:40:26 +00:00
Ankush Menat
c051c7aba8
fix: keep modified indexed if that's what schema asks for (#25668) 2024-03-27 08:49:49 +00:00
Ankush Menat
432c8cf48c
Merge pull request #25624 from ankush/creation
fix!: Switch to `creation` as default sort order
2024-03-27 13:25:53 +05:30
Ankush Menat
071e269548 fix!: Switch to creation as default sort order 2024-03-27 11:18:28 +05:30
Thatoo
ed01fc3b26
feat: don't require editing MariaDB configuration to setup frappe (#25609)
* feat(db_requirements): Update db_manager.py

* feat(db-requirements): Update setup_db.py

* feat(db-requirements): Update setup_db.py

Don't add error message on top of check_compatible_versions() 's one

Co-authored-by: gavin <gavin18d@gmail.com>

---------

Co-authored-by: gavin <gavin18d@gmail.com>
2024-03-26 18:49:22 +05:30
Akhil Narang
06db7a2b2b
fix: can't compare str with int
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-03-13 12:52:54 +05:30
David
61e54eac17
fix: postgres version check 2024-03-12 09:21:34 +01:00
Ankush Menat
13c74ec231 fix: Use debug log to log DB queries 2024-03-10 12:49:19 +05:30
Ankush Menat
62afa419f8 fix: Add is_virtual in bootstrap schema 2024-03-10 12:19:37 +05:30
Ankush Menat
638dbb6bcd fix: disable transaction commits during doc events
- Events like doc.save and doc.submit need to be atomic
- Document hooks can make it not so atomic.

This is extending server script behaviour where server script hooks are
not allowed to commit/rollback.
2024-03-06 14:53:00 +05:30
Ankush Menat
b60c64cacc
fix: rollback invalid customize form changes (#25198)
* fix: rollback invalid customize form changes

* fix: commit before doing DDL
2024-03-03 17:17:12 +05:30
Ankush Menat
b4fe7223c1 fix(postgres): treat LockNotAvailable as timeout
It's a lock timeout in a way.
2024-02-29 18:04:05 +05:30
Ankush Menat
e810fb7eca feat: nowait to skip blocking locks 2024-02-29 16:30:24 +05:30
Shankarv19bcr
437beaa735 fix: typo 2024-02-21 17:19:32 +05:30
Akhil Narang
3f1e19de85
refactor(treewide): enable RUF rules
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-02-21 16:20:28 +05:30
Raffael Meyer
68eb2d978d
fix: keep order in get_values_from_single (#24907)
* fix: keep order in `get_values_from_single`

* fix: add test for destructuring

---------

Co-authored-by: Ankush Menat <ankush@frappe.io>
2024-02-19 05:35:35 +00:00
Ankush Menat
4350f94616
refactor: add_column (#24867)
- Skip cache which can be invalid
- Do check at db level
2024-02-12 07:45:18 +00:00
Suraj Shetty
803c02258a fix: Ignore "Invalid Doctype" validation if ignore flag is passed 2024-02-09 14:08:24 +05:30