Commit graph

66 commits

Author SHA1 Message Date
Suraj Shetty
86263e05f4 perf: Cache db columns to avoid redundant database calls (#8543)
* perf: Cache db columns to avoid redundant database calls

* fix: Move cache clearing code from doctype to schema.py

* fix: self.table_name instead of self.name

* fix: Cache columns in  "table_columns" key

`table_columns` was cached in meta but columns were also getting accessed
directly using frappe.db.get_table_columns. Now, it is cached at
`frappe.db` layer

Co-authored-by: Suraj Shetty <surajshetty3416@gmail.com>
2019-10-07 13:39:40 +00:00
Faris Ansari
f926a2aa48
Merge pull request #8488 from hrwX/global_tags
feat(Desk): Global Tags
2019-10-07 19:05:28 +05:30
John Clarke
118bba4a83
report the name of the DocType when the associated table is missing
Reported here https://discuss.erpnext.com/t/bench-migrate-fails-with-pymysql-err-programmingerror-it-doesnt-print-what-is-the-error/53540
2019-10-06 10:34:19 -06:00
Himanshu Warekar
02cebdd7d3 fix: use frappe.tags 2019-10-03 16:43:36 +05:30
Himanshu Warekar
b7196f124c feat: use tag link for global tags 2019-09-24 23:25:04 +05:30
Himanshu Warekar
f6d1ce2194 feat: Global Tags 2019-09-24 01:03:11 +05:30
Suraj Shetty
7fe35a2d3c
fix: set default value in set_value as None to avoid error.
```
frappe.db.set_value('Call Log', log.name, {
			fieldname: doc.name,
			display_name_field: doc.get_title()
		}, update_modified=False)
```
this code should not fail if value is not pass because value is passed in the dict.
2019-09-23 15:54:46 +05:30
Faris Ansari
c8a80a2e4d fix: frappe.db.field_exists
- field_exists didn't work correctly
- The call to field_exists itself was wrong
2019-09-19 15:41:17 +05:30
Sahil Khan
a5480c8dfc feat(custom_field): update db on updating custom field 2019-09-12 18:37:13 +05:30
Himanshu Warekar
e955361610 fix: if not db host then localhost 2019-09-11 12:15:04 +05:30
Saurabh
99671a4604 fix: handle data too long exception (#8292) 2019-09-02 23:30:10 +05:30
Faris Ansari
9cbd2b3c30 fix: Add column in framework.sql 2019-09-02 16:09:18 +05:30
Sahil Khan
9b65a7c4a1 Merge branch 'version-12-hotfix' into merge_v12_hotfix_1 2019-08-20 16:09:39 +05:30
Suraj Shetty
22103a9fdb fix: Run patch only if the db_type is mariadb 2019-08-09 15:16:29 +05:30
Suraj Shetty
d9f70b7fab fix: check_default method for column in schema.py
- This fixes the multiple creation of index for same columns

Co-authored-by: Faris Ansari <netchamp.faris@gmail.com>
2019-08-08 15:56:04 +05:30
kratos
4c5a8d41af bug fix - Postgres db connection
Missing quotes in connection string.
2019-08-08 13:22:15 +05:30
mergify[bot]
349b32943d
Merge pull request #7101 from zeroiszero/fix-rds-privileges
fix: AWS RDS privileges issue
2019-07-19 12:43:18 +00:00
Aditya Hase
6e744320ea
Update db_manager.py 2019-07-19 17:26:49 +05:30
gweecl
b472cefbd5 fix: travisCI 2019-07-19 11:14:38 +08:00
zeroiszero
60b0b1e0f7
fix: travisCI 2019-07-19 11:03:29 +08:00
zeroiszero
7fd515e0bd
keep default and use flag for rds 2019-07-18 22:33:03 +08:00
mergify[bot]
a72a9e1946
Merge pull request #7909 from netchampfaris/website-theme-fixes
fix: Website Theme UX
2019-07-17 09:39:41 +00:00
Faris Ansari
2492289eac fix: Remove redundant assignment 2019-07-17 12:42:03 +05:30
Faris Ansari
64f078a686 fix: Validation for invalid field name 2019-07-16 13:58:14 +05:30
Suraj Shetty
317714a59d fix(postgres): Remove typcasting for date 2019-07-16 13:25:16 +05:30
Anurag Mishra
570fd44248 fix: Translating Errors and Messages 2019-07-03 11:52:47 +05:30
mathieu.brunot
63cda10b9b
🐛 Use db_host to setup pgsql and close #7704
Signed-off-by: mathieu.brunot <mathieu.brunot@monogramm.io>
2019-06-14 18:52:56 +02:00
Aditya Hase
2c93dc74fe fix: Update regex for capturing touched tables from query (#7588)
Previous regex used to yield false positives and false negatives
for queries like

UPDATE tabToDo SET description = "something"

Instead of yielding "tabToDo" it used to yield "tabToDo SET".

Now two separate regexes handle single word and multi-word names
In case of multi-word surrounding quotes are a must
2019-05-29 14:51:19 +05:30
Rushabh Mehta
7e42520554 fix(minor): frappe.conf.db_type in sql exception 2019-05-28 12:29:39 +05:30
Rushabh Mehta
17c43b4e1d fix(db_type) 2019-05-24 12:06:39 +05:30
Rushabh Mehta
1c893e44c0 fix: frappe.conf.db_type -> frappe.db.db_type 2019-05-24 11:44:28 +05:30
Rushabh Mehta
2ef6af8244 fix(minor): added frappe.db.db_type 2019-05-24 09:09:46 +05:30
jibin jose
1a58c13966 fix(postgres): Make db queries postgres compatible 2019-05-20 12:31:30 +05:30
Rushabh Mehta
b19f84120c fix(link-preview): show preview only if setup and cleanup style 2019-05-16 10:24:43 +05:30
Rushabh Mehta
6157ebb4b5
Merge pull request #7281 from prssanna/link-preview
feat(desk): Link preview popover
2019-05-03 12:41:04 +05:30
jibin jose
f1044afe8c Fix postgres tests
- take postgres superuser from user iff it is not in config
2019-05-02 12:29:41 +05:30
jibin jose
63417782c9 Fix: Postgres DB setup
- Bootstrap postgres db using frappe db user not with postgres default
user
- Save postgres db password in env variable to avoid prompting of
password
- Pass the user name and password while connecting to postgres db
2019-05-02 10:31:42 +05:30
Faris Ansari
7cd94e9323
fix: Print query in console if syntax error (#7371) 2019-04-29 21:37:44 +05:30
Rushabh Mehta
fce9989e1f
Merge pull request #7326 from oshosanya/allow-database-port-config
feat: Allow user to specify database port
2019-04-25 11:40:54 +05:30
Prssanna Desai
f2391ff87a Add preview popover on hover to all link fields 2019-04-24 15:09:41 +05:30
Michael Oshosanya
7ac234f38a Resolve conversation 2019-04-23 07:04:55 +01:00
Michael Oshosanya
3b1d978c08 Resolve conversation 2019-04-23 07:02:07 +01:00
Michael Oshosanya
5e97e04000 Resolve conversation 2019-04-23 06:41:33 +01:00
Aditya Hase
c29fcb02d6 feat: Maintain list of tables touched during migrate
This can be used to selectively restore changed tables from backup
after migrate failure
2019-04-23 10:31:44 +05:30
Michael Oshosanya
89a80908a1 Resolve conversation 2019-04-22 08:02:57 +01:00
Rushabh Mehta
01242afc8f
Merge pull request #7304 from rmehta/milestone-tracker
feat: Milestone Tracker. Track document lifecycle with milestones
2019-04-22 11:08:49 +05:30
Michael Oshosanya
a0f8d3f21c Allow user to specify database port 2019-04-21 19:43:49 +01:00
Rushabh Mehta
0f1d8c7622 fix(for-patch): cache manager to ignore missing tables 2019-04-20 16:48:30 +05:30
Brian Pond
d0273b1b27 fix(mariadb): refactor db setup (#7049)
* Fixed setup_db.py to support MariaDB version 10.3.  Added function for calculating versions, per MariaDB documentation.

* Major rewrite of setup_db.py. Reduced number of functions. Made fully compatible with MariaDB 10.3+. Removed references to client parameters in my.cnf that cannot be queried.  Applied PEP8 rules to python code.

* Adding missing print statement in setup_db.py

* Replaced 4-spaces with tabs, per ERPNext standards.

* Fixed broken test by substituing 'check_database_settings()'

Fixed the test in convert_to_barracuda_and_utf8mb4.py by calling the new function 'check_database_settings()'

* Cleaned up setup.py, to match latest version of Frappe develop
2019-04-17 18:38:11 +05:30
Faris Ansari
c9fac081b8
Merge pull request #7128 from Mangesh-Khairnar/rating-control
Feature: Rating control
2019-03-28 14:16:12 +05:30