Commit graph

308 commits

Author SHA1 Message Date
Ankush Menat
e5eca8232f
fix: dont auto drop manually created index on text types (#15739) 2022-01-26 17:47:30 +05:30
Suraj Shetty
75245c25dc
Merge pull request #15680 from surajshetty3416/fix-db-index 2022-01-25 11:16:47 +05:30
Ankush Menat
e58c557e12 fix: correctly compute doctype name from table name 2022-01-24 11:18:21 +05:30
Suraj Shetty
490b2f61cd chore: Add nosemgrep comment to avoid semgrep warnings 2022-01-24 11:00:18 +05:30
Suraj Shetty
9a5409892d fix(postgres): Create indexes while creating table
Previously, indexes were not getting created based on "search_index" configuration while creating new table
2022-01-24 10:26:38 +05:30
Suraj Shetty
47393bcb85 style: Fix formatting issues 2022-01-24 09:44:25 +05:30
Suraj Shetty
4d384f308b fix: Unique and Index constraints 2022-01-23 22:57:33 +05:30
Suraj Shetty
39031d18ed fix: Check if index exists with specific key_name 2022-01-23 17:44:07 +05:30
Suraj Shetty
c0fe37b94e fix: Sync "index" & "Unique" constraint changes in DB 2022-01-21 21:18:16 +05:30
Gavin D'souza
981564e544 Merge branch 'develop' into frappe-postgres-changes 2022-01-07 11:37:28 +05:30
Conor
40ba1ac9ba fix: Postgres Compatibility
* Handle inconsistencies in type handling in DatabaseQuery & Database
  APIs
* Update incompatible queries with frappe.qb notation
* Fixed use cases discovered by failing ERPNext CI tests

fix: db independent syntax for user_type

fix: handle postgres datetime values

feat: add ability to auto commit on db inserts

feat: add ability to escape underscore in postgres

fix: handle missing data in test runner bootstrapping

fix: db independent syntax for queries

fix: refactor to use qb

fix: update cache for language

fix: use pluck in email_queue

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

fix: don't auto insert on tests for make_property_setter

fix: remove auto_commit in custom_field insertion

fix: remove auto_commit functionality

fix: review comments

fix: revert link validation

fix: style suggestion for readability

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

fix: revert .lower() in link validation

fix: add rollback for setup_wizard

Revert "fix: add rollback for setup_wizard"

This reverts commit 83b3b0913db17718ccd5edae01858cff15603829.

Revert "feat: add ability to escape underscore in postgres"

This reverts commit 8ed9c2aa3306438e94bb813f60e65b416d0b947b.

fix: more concise representation of order fields

Co-authored-by: gavin <gavin18d@gmail.com>
2022-01-07 10:44:57 +05:30
mergify[bot]
ea5d99b0e9
Merge pull request #15484 from MochaTechnologies/migrate-new-column-index
fix(Migrate): add unique and index for new columns
2022-01-06 05:54:18 +00:00
mergify[bot]
96a45473ab
Merge pull request #15492 from resilient-tech/fix-clear-cache-in-set-value
fix: clear cache for all docs matched with the filters passed as `dn` param in `set_value`
2022-01-05 07:06:07 +00:00
Ankush Menat
80d456ef7e fix: avoid cached results for table_exists during install 2022-01-05 11:54:46 +05:30
Ankush Menat
08464553f3 fix: define check_transaction_status for postgres
To implement repeatable reads it has to respect transactions.
2022-01-04 13:59:22 +05:30
Ankush Menat
43364cf89b fix!: use repeatable read isolation level
RR isolation is default in MariaDB, for sake of consistency use same
isolation level in postgres
2022-01-04 13:59:22 +05:30
Ankush Menat
0fddbafd09 fix(postgres)!: dont silently rollback on db exception 2022-01-04 11:25:08 +05:30
Ankush Menat
d603aaf601 fix: define is_syntax_error for postgres 2022-01-04 11:25:08 +05:30
Ankush Menat
3c83043301 chore: sort imports
also fix `time` import
2022-01-04 10:53:31 +05:30
Ankush Menat
e08b41964c feat: savepoint contextmanager
syntactic sugar around frappe.db.savepoint and rollback
2022-01-03 22:20:39 +05:30
Rushabh Mehta
66a8e125d4 fix(ux): add "Show Dashboard" check for tab breaks 2022-01-03 13:57:36 +05:30
Pruthvi Patel
289d7e7afa fix: clear cache when filters passed as dn param in set_value 2022-01-01 17:49:59 +05:30
Saif Ur Rehman
063cc293a9 fix(Migrate): add unique and index for new columns 2021-12-31 13:37:40 +05:00
Ankush Menat
600156b1a1 refactor!: allow modified column to be nullable
* updated change_column_type to allow making columns nullable.
* breaking change: in postgres the method was previously nullable by
  default, changed it to be consistent with mariadb.
2021-12-24 16:31:06 +05:30
Aditya Hase
d334379b02
fix(restore): Repopulate db_tables cache after database restore
This takes care of the following scenario.

During restore, before tabDefaultValue is created if a request/command executes frappe.db.get_tables, then the cached value db_tables is populated with partial list of tables.

bootstrap_database then checks if this partial list contains tabDefaultValue (as a sanity test to see if the restore worked). This check fails even though the database is correctly restored.
2021-12-22 10:58:17 +05:30
Ankush Menat
1c0de77634 feat: SQL savepoints 2021-12-20 23:07:53 +05:30
mergify[bot]
87adfb5ebd
Merge pull request #15203 from DeeMysterio/star-rating-dev
feat: make rating field's stars customizable with options field
2021-12-17 11:17:23 +00:00
Aradhya
7faa843e97 feat: Added distinct in get_value 2021-12-17 15:01:24 +05:30
Aradhya
e1360a3770 test: Added tests for distinct in get values 2021-12-17 13:45:57 +05:30
Aradhya
33b4ff0a84 fix(db): fixed distinct in get_values
refactor: remove redundant imports
2021-12-17 13:30:07 +05:30
Suraj Shetty
39014b09d8
Merge branch 'develop' into star-rating-dev 2021-12-14 18:18:36 +05:30
Diksha Jadhav
c477398a2f feat: make rating field's stars customizable with options field 2021-12-13 16:03:21 +05:30
Aradhya
3243fb2083 fix: misc fixes 2021-12-06 13:04:27 +05:30
mergify[bot]
23e5505923
Merge pull request #15170 from Aradhya-Tripathi/at/fixes
fix: fixed list of Field objects as fields in get_values
2021-12-03 14:36:36 +00:00
Saqib Ansari
6f7d030e82 fix: IndexError while handling sql timeout error 2021-12-03 16:06:23 +05:30
Aradhya
e862ae83da fix: fixed list of Field objects as fields in get_values
tests: added test for list of field objects
2021-12-03 14:24:19 +05:30
Aradhya
69108c4c86 Merge branch 'develop' of github.com:Aradhya-Tripathi/frappe into at/aggregations 2021-11-27 17:52:30 +05:30
Aradhya
fc65c2cd36 fix: fixed pluck in execute 2021-11-25 16:20:06 +05:30
Aradhya
f04b2157f1 refactor: getting rid of kwargs 2021-11-25 13:07:38 +05:30
Aradhya
47367fc107 Merge branch 'at/aggregations' of github.com:Aradhya-Tripathi/frappe into at/aggregation 2021-11-24 19:01:29 +05:30
Aradhya
6a045f69f5 fix: fixed translate import 2021-11-24 16:55:45 +05:30
Aradhya
c9b05f7d95 fix: fixed as_dict in get_values 2021-11-24 16:10:29 +05:30
Aradhya
303edc8c04 refactor: added get_sql function to query class (encapsulation++) 2021-11-24 15:53:03 +05:30
Aradhya
7a0c06b46a fix: fixed semgrep issues 2021-11-23 15:56:55 +05:30
Aradhya
d55d19ea50 refactor: using throw instead of raise 2021-11-23 15:46:44 +05:30
Aradhya
59f54aa60c refactor: changed default_ordering to keep_default_ordering 2021-11-23 15:26:15 +05:30
Aradhya
c4f76c0568 fix: fixed order_by arg in get_value 2021-11-23 14:21:20 +05:30
Aradhya
30278a3939 refactor: removed no_order to support order_by None as valid input 2021-11-23 13:29:59 +05:30
Aradhya
ae68ad53a7 feat: Added permissions to database API 2021-11-20 23:51:06 +05:30
Aradhya
ae59fd7c58 feat: added no_order to execute 2021-11-19 22:58:32 +05:30