Commit graph

866 commits

Author SHA1 Message Date
Aradhya-Tripathi
3bd665ddf6 refactor: using frappe.qb for frappe.db.get_values 2021-09-20 22:21:54 +05:30
Aradhya-Tripathi
3fefc6a10d fix: added delete without filters 2021-09-20 22:21:24 +05:30
Aradhya-Tripathi
a738f8ba7b wip: adding support for sql functions in frappe ORM 2021-09-20 22:21:00 +05:30
Aradhya-Tripathi
ae0c5ee291 refactor: moved to frappe.qb in frappe.db.delete 2021-09-20 22:20:40 +05:30
Aradhya-Tripathi
f36808e4cc refactor: using Query for frappe.db.delete 2021-09-20 22:20:25 +05:30
Aradhya-Tripathi
1e6b30b711 refactor: shifted build_conditions to query module 2021-09-20 22:19:55 +05:30
Samuel Braun
ac9ab3bd95
fix(database): Fixed sql convention inconsistency (#14230) 2021-09-16 17:50:22 +05:30
gavin
4041442e6a
Merge pull request #13955 from gavindsouza/trim-db
feat: Site Maintenance commands
2021-09-15 17:08:40 +05:30
gavin
fc8b253916
Merge pull request #14197 from gavindsouza/misc-fixes-1
fix: Misc fixes
2021-09-15 12:55:06 +05:30
Gavin D'souza
f1d2886328 Merge branch 'develop' of github.com:frappe/frappe into mariadb-10_6 2021-09-14 22:10:24 +05:30
Gavin D'souza
3adc459e4d Merge branch 'develop' of github.com:frappe/frappe into trim-db 2021-09-14 21:53:21 +05:30
Gavin D'souza
713eaf6ac9 chore: Raise NotImplementedError in base Database class
Methods that have to be overridden should throw NoteImplementedError.
Helps during development :')
2021-09-14 18:36:01 +05:30
Gavin D'souza
1545ad65d1 fix: Don't need postgres to use Frappe
* Made code DRY-er by using obscure frappe.db.is_data_too_long
* Python would run psycopg import line which would check if postgres is
  installed. Sites just wanting to chill w MariaDB would also need
  Postgres to be installed to get Frappe running. Fixes https://github.com/frappe/frappe/issues/14193
2021-09-14 13:06:59 +05:30
Gavin D'souza
f2dfac684f chore: Improve readability for Schema.create 2021-09-09 15:49:24 +05:30
Abhishek Saxena
1d02d26a2b
Merge branch 'develop' into aks-fix-postgres 2021-09-07 17:42:03 +05:30
Your Name
74d6ed32d6 test: add frappe.db.add_index 2021-09-07 17:40:55 +05:30
Gavin D'souza
07c5d0a28c fix(db_pg): Strip index size from each field 2021-09-07 11:27:38 +05:30
Your Name
08b7430ba2 fix: change fieldname for postgres create index 2021-09-06 16:41:50 +05:30
Gavin D'souza
43459749e2 Merge branch 'develop' into trim-db 2021-09-06 11:35:59 +05:30
Rushabh Mehta
d807e3b1e2 fix(minor): fix for aggregate functions, use special query 2021-09-06 09:11:58 +05:30
Rushabh Mehta
5befc80cd4 fix(minor): linting 2021-09-05 22:30:09 +05:30
Rushabh Mehta
20dea90670 feat(minor): Packages! also cleanup of DocField and other minor fixes 2021-09-05 22:01:55 +05:30
Gavin D'souza
62593c49fb refactor: Rename arg table to doctype
This change was made to be "more accurate" about how the internal magic handled
2021-09-03 20:14:40 +05:30
Gavin D'souza
3446026555 chore: Update header: license.txt => LICENSE
The license.txt file has been replaced with LICENSE for quite a while
now. INAL but it didn't seem accurate to say "hey, checkout license.txt
although there's no such file". Apart from this, there were
inconsistencies in the headers altogether...this change brings
consistency.
2021-09-03 12:02:59 +05:30
Gavin D'souza
b88eca73c3 Merge branch 'develop' into mariadb-10_6 2021-09-02 15:34:29 +05:30
Gavin D'souza
ed6533f737 fix: Use cast in favour of cast_fieldtype
Use newly introduced casting util for Python-Frappe types mapping
2021-08-20 12:37:15 +05:30
Gavin D'souza
cb034e4c52 fix: Consistent return types in cast_fieldtype
Note: BREAKING CHANGE
2021-08-20 12:08:39 +05:30
Gavin D'souza
623998c787 fix(db): Cast single dt field only if value is truthy 2021-08-20 11:05:03 +05:30
Gavin D'souza
7f338edca1 feat: Command to trim tables
Maintenance command to get rid of extra columns in your DocType tables.
These columns are remnants of "deleted" fields through customizations or
upgrades
2021-08-17 12:50:11 +05:30
Gavin D'souza
f8826750d4 chore: Use DYNAMIC row_format instead of deprecated COMPRESSED
refs:
* MariaDB 10.6 gets rid of the COMPRESSED row_format
* https://dev.mysql.com/worklog/task/?id=8307
* https://stackoverflow.com/questions/24321896/mysql-row-format-compressed-vs-dynamic
2021-08-17 12:39:56 +05:30
Ankush Menat
8ed2c87e00
perf: fix unneneccsary clearing of db.value_cache 2021-08-06 13:02:23 +05:30
hrwx
d056beb0ef feat: show title links in Link Fields 2021-08-03 15:55:32 +05:30
Shariq Ansari
fd99f4bb61
Merge branch 'frappe:develop' into icon-picker 2021-08-03 12:47:44 +05:30
Gavin D'souza
f7b8f86666 Merge branch 'develop' of github.com:frappe/frappe into aks-orm 2021-07-30 13:10:59 +05:30
mergify[bot]
8dfbc14852
Merge pull request #13786 from hasnain2808/optimize-bench-migrate
perf: optimize recollecting routes for  bench migrate
2021-07-30 06:37:13 +00:00
saxenabhishek
42dc8a180f refactor: get_table_name, run_only_if 2021-07-30 11:48:12 +05:30
saxenabhishek
7671e78487 style: minor fixes and improvements 2021-07-30 11:29:41 +05:30
saxenabhishek
45d1afe739 refactor: move rename, change_column_type, DESC to db 2021-07-30 11:00:35 +05:30
saxenabhishek
ee3c84beef style: typecast to string inside db.sql 2021-07-30 11:00:35 +05:30
Gavin D'souza
b40721de4b style: Remove extra whitespace 2021-07-29 12:53:43 +05:30
Gavin D'souza
3ca7fa7796 refactor(minor): Make frappe.db.delete DRY-er 2021-07-28 19:01:07 +05:30
hasnain2808
17e7f557a1 Merge branch 'develop' of https://github.com/frappe/frappe into optimize-bench-migrate 2021-07-27 13:36:34 +05:30
hasnain2808
36feb72c89 fix: add column entries in doctypes 2021-07-27 11:29:00 +05:30
Aradhya-Tripathi
2f3371d873 refactor: Moved raw queries to frappe orm 2021-07-23 23:14:24 +05:30
Gavin D'souza
36c4be9a8d feat: frappe.db.truncate
ORM wrapper for SQL DDL statement

* Alias frappe.db.clear_table to use truncate
* Support for __ tables is added here
2021-07-23 11:52:41 +05:30
Gavin D'souza
1c82b83be0 refactor: Simplify frappe.db.delete logic
* Rename conditions kwarg to filters. Handle conditions kwarg if passed
* Re-added exc raise for no filters...to risky. Thinking of having an
  extra kwarg like `force` or something...undecided
* Added Python type hints
* Accept and pass kwargs to frappe.db.sql...Now pass any kwarg db.sql
  accepts
* Pass debug from fn def if someone is still using it as a positional
  arg :thonk:
2021-07-23 11:30:02 +05:30
Aradhya-Tripathi
bc39fd869f fix: Fixed typos 2021-07-23 10:45:54 +05:30
Aradhya-Tripathi
931549ee05 refactor: changed delete to accept no conditions 2021-07-21 19:20:35 +05:30
Shariq Ansari
e3e26dd8d6
Merge branch 'develop' into icon-picker 2021-07-14 13:50:39 +05:30
shariquerik
b6c71251a3 feat: Icon Picker 2021-07-10 21:58:57 +05:30