Commit graph

877 commits

Author SHA1 Message Date
David Arnold
d5fd8d7c20
chore(docref): fix circular imports (#28282) 2024-10-24 22:31:12 +02:00
Nabin Hait
322ce6f665
fix: get multiple values from single table (#28252)
* fix: get multiple values from single table

* fix: linter issues

* fix: linter issues
2024-10-23 12:11:23 +05:30
David Arnold
86f70b9e98
chore: inline unnecessary indirection (#28250) 2024-10-22 19:33:48 +00:00
Akhil Narang
44128aa62e
refactor: update backup restore failure message
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-10-22 12:49:36 +05:30
David Arnold
91a737d8fe
chore(typing): fix some (exotic) type errors treewide (#28210) 2024-10-21 10:02:04 +00:00
David Arnold
90e44d950e
fix: hashable is enough to serve as (composite) cache key (#28189) 2024-10-19 23:19:48 +02:00
David Arnold
2abba7b51b
fix: don't force values into the string type (#28185) 2024-10-19 19:00:25 +00:00
David Arnold
7348572af8
feat: docref identifier / proxy (#27973)
* feat: add DocRef

* feat: Add comprehensive test cases for DocRef functionality

* chore(db): add field type hints

* fix: ensure document stringer fulfills the DocRef contract
2024-10-19 09:40:26 +05:30
Akhil Narang
e96ff7e65e
Merge pull request #28015 from marination/not-set-filter
fix: 'not set' equivalence in query conditions
2024-10-14 16:00:55 +05:30
David Arnold
8cfeb156df
devx: add deprecation dumpster (#27887)
* feat: Add deprecation_dumpster.py file

* docs: add jovial and jocose docstring for frappe/deprecation_dumpster.py

* refactor: fill the dumpster with its own kind

* refactor: move to the deprecation dumpster

* chore: color coding class

* fix: only check import error when import errors
2024-10-08 18:56:10 +02:00
marination
6ab347d9f5 fix: 'not set' must translate to the same condition whether used via QB or not 2024-10-07 18:52:29 +02:00
Corentin Forler
1195260c92
chore: Add type hints 2024-09-19 14:05:25 +02:00
Corentin Forler
2818c745b6
fix(restore): Remove sandbox mode comment
d20518168a
2024-09-19 14:05:25 +02:00
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