Commit graph

850 commits

Author SHA1 Message Date
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
Akhil Narang
26ae0f3460
fix: ruff fixes
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-02-07 17:04:31 +05:30
Ankush Menat
de9ac89748 style: re-format with ruff 2024-02-05 18:53:33 +05:30
Ankush Menat
c02f5d5876
fix: Skip fulltext indexes during sync (#24728)
These are not managed by framework's migration system so we shouldn't
delete them.
2024-02-05 05:30:44 +00:00
Akhil Narang
f19c25ec42
Merge pull request #24432 from blaggacao/chore/cleanup-frappe-connect-2
chore: cleanup frappe connect II/II
2024-02-02 16:53:19 +05:30
David Arnold
3abbde3284
fix: shell escaping on external commands 2024-01-30 18:23:05 +01:00
David Arnold
b57dbe2dbc
Merge remote-tracking branch 'origin/develop' into chore/cleanup-frappe-connect-2 2024-01-30 10:47:19 +01:00
Akhil Narang
06ed2f5246
fix: allow site creation to work on FC again
FC creates a temporary non-root user to use as the root user here, which doesn't have `SELECT` permissions on `mysql.user`
Try to work around it by relying on `CREATE USER IF NOT EXISTS`

Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-01-24 18:50:23 +05:30
David Arnold
94378b6566
chore: simplify frappe.connect and use site config for bootstrapping 2024-01-19 13:49:36 +01:00
Akhil Narang
8a3f14d990
chore: restore original order of parameters - add the new one to the end
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-01-19 16:28:56 +05:30
David Arnold
a1a653632f
fix: avoid changing argument order 2024-01-19 10:31:57 +01:00
David Arnold
7bec22e238
Merge remote-tracking branch 'origin/develop' into chore/cleanup-low-level-db-interface 2024-01-18 13:22:33 +01:00
David Arnold
9a1af12a41
chore: more concise code 2024-01-18 10:20:12 +01:00
David Arnold
bd357f41d3
feat: add defaults to db superuser prompt 2024-01-17 20:25:27 +01:00
David Arnold
f889d09d0b
fix: set defaults at the highest level interface 2024-01-17 18:59:34 +01:00