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
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
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
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
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
Ankush Menat
62afa419f8
fix: Add is_virtual in bootstrap schema
2024-03-10 12:19:37 +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
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
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
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
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
Akhil Narang
265c0b0e01
fix(drop-site): set db root credentials in frappe.flags like how new-site is done
...
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-01-16 12:35:01 +05:30
Akhil Narang
f876aa385c
fix(setup_db): use the correct user
...
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-01-16 12:35:01 +05:30
Akhil Narang
1e6eeba9b7
fix: add in missing logic, add in a test for creating a site with a specific user
...
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-01-16 12:35:01 +05:30
Akhil Narang
c721fcf8c4
refactor: allow setting a db user name different from the database name
...
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2024-01-16 12:35:01 +05:30
Ankush Menat
a2525e545a
perf: Unbuffered cursors for large result sets ( #24365 )
...
If you're reading 1000s of rows from MySQL, the default behaviour is to
read all of them in memory at once.
One of the use case for reading large rows is reporting where a lot of
data is read and then processed in Python. The read row is hoever not
used again but still consumes memory until entire function exits.
SSCursor (Server Side Cursor) allows fetching one row at a time.
Note: This is slower than fetching everything at once AND has risk of
connection loss. So, don't use this as a crutch. If possible rewrite
code so processing is done in SQL.
2024-01-16 11:00:12 +05:30
Ankush Menat
d5b27061ad
perf: avoid duplicate copies of result set
...
When as_list, as_dict is done we hold on to original result set until
next query is performed. This can be HUGE for large queries.
2024-01-15 12:32:07 +05:30
David Arnold
3fa76b827c
chore: name current db handle properly
2024-01-14 17:14:21 +01:00
Xiaoguang Sun
68d4a5ad82
Do not call begin in updatedb after syncing ( #23934 )
...
Do not call begin in updatedb after syncing as commit does it already.
Signed-off-by: Xiaoguang Sun <sunxiaoguang@gmail.com>
2023-12-26 12:12:19 +05:30
Hussain Nagaria
8d2137c265
docs: consistent doc strings
2023-12-18 18:27:39 +05:30
barredterra
c35476256f
refactor: simplify conditional logic
...
Command: `sourcery review --fix --enable de-morgan .`
2023-12-05 11:14:41 +01:00
Akhil Narang
fbc88a4d24
refactor(treewide): code cleanup
...
Drop redundant bool conversion
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2023-11-23 13:57:51 +05:30
Ankush Menat
d715b0ad31
Merge pull request #22804 from akhilnarang/non-nullable-fields
...
feat: allow setting fields as not nullable
2023-11-20 12:46:02 +05:30
Akhil Narang
ae9ae40bad
Merge pull request #23168 from blaggacao/refactor/centralize-python-shell-interface-for-database-binaries
...
refactor: give cli invocations of dbtools a dedicated interface
2023-11-17 17:02:41 +05:30
Akhil Narang
5598fe241e
fix: use default default if a custom default isn't specified
...
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2023-11-16 14:51:57 +05:30
Akhil Narang
558ac413ce
fix(mariadb/schema): use correct default value
...
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2023-11-16 14:51:57 +05:30
Akhil Narang
8d540963c8
refactor(mariadb/schema): use sql_ddl() method
...
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2023-11-16 14:51:57 +05:30
Akhil Narang
ccc2bdad52
fix: go back to original transaction handling mechanism
...
This reverts the following:
07acfeed47 chore: move check_implicit_commit() call back to its original location
fc38a0b503 chore: simplify transaction handling
1e29e81543 chore: rework implicit commit checks
ae0a3fd202 feat: allow ignoring implicit commit warning
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2023-11-16 14:51:57 +05:30
Akhil Narang
4855ec76c2
chore: use index to access table column instead of getattr
...
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2023-11-16 14:51:57 +05:30
Akhil Narang
806748b063
chore: simplify transaction handling
...
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2023-11-16 14:51:57 +05:30
Akhil Narang
fe549ecc49
chore: don't check for semgrep here
...
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
2023-11-16 14:51:57 +05:30