Commit graph

119 commits

Author SHA1 Message Date
phot0n
4418c03237 fix: remove default null definition for name column in tabSeries
for postgres
2022-04-25 20:13:10 +05:30
Shridhar Patil
39f8267a15
feat: added support for data type json (#16187)
> Please provide enough information so that others can review your pull request:

Added json support for postgres and mariadb



> Explain the **details** for making this change. What existing problem does the pull request solve?
https://github.com/frappe/frappe/projects/4#card-50160428


> Screenshots/GIFs
![json](https://user-images.githubusercontent.com/11792643/156367383-8f8492c2-3817-449d-a2dd-c983eeadbb48.gif)



---

**Previous attempts:** 

https://github.com/frappe/frappe/pull/8128
https://github.com/frappe/frappe/pull/7096


Docs: https://frappeframework.com/docs/v13/user/en/basics/doctypes/fieldtypes#json
2022-04-14 04:21:41 +00:00
Suraj Shetty
c0c5b2ebdd
style: format all python files using black (#16453)
Co-authored-by: Frappe Bot <developers@frappe.io>
2022-04-12 10:59:25 +05:30
gavin
e696a8d73a
Merge pull request #16305 from gavindsouza/drop-site-pg
feat: Drop site support for postgres
2022-03-17 15:44:42 +05:30
Gavin D'souza
2558c6bee0 feat: Drop site support for postgres 2022-03-16 19:06:33 +05:30
phot0n
bebc8058b6 feat: integer primary keys 2022-03-11 23:46:00 +05:30
Gavin D'souza
ad1e180666 feat(db): Alias is_missing_table for consistency in APIs 2022-03-11 14:03:21 +05:30
Sagar Vora
a6d991272e fix: sider warning 2022-03-10 09:38:32 +05:30
Sagar Vora
5d93907a19 fix: improve modify_query regex 2022-03-10 09:28:13 +05:30
Saqib Ansari
7ce128de6c Merge branch 'develop' of https://github.com/frappe/frappe into autocomplete-control 2022-02-25 15:49:13 +05:30
Revant Nandgaonkar
cdc6bcadb1
fix(cli): Database agnostic options for root db credentials (#15973)
* fix(bench): new-site params for root db credentials

allow root credentials for postgresql
use common cli option name for both database types

* fix(bench): backward compatible db params

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

* fix(bench): use common db cred params

use --db-root-username and --db-root-password

* feat(bench): add --set-default to bench new-site

* fix: do not set default root user

* fix: indentation

Co-authored-by: gavin <gavin18d@gmail.com>
2022-02-25 09:58:59 +05:30
Ankush Menat
33890ed860 refactor: use f-strings instead of .format and % 2022-02-22 11:23:51 +05:30
cpdeethree
b2116ff36d fix: error in table creation from incorrect scope 2022-02-21 20:27:05 -06:00
Saqib Ansari
8f277a247e Merge branch 'develop' of https://github.com/frappe/frappe into autocomplete-control 2022-02-12 16:27:27 +05:30
Saqib Ansari
6e0c4946f1 Merge branch 'develop' of https://github.com/frappe/frappe into link_title_refactor 2022-02-09 10:43:34 +05:30
phot0n
266e1f95ed chore: adding back idx column
This is needed for ordering in display of links as it keeps
track of the clicks on a particular link item
2022-02-07 16:40:01 +05:30
phot0n
b31f3c24f6 refactor: remove parent, parenttype, parentfield, idx columns from non-child table doctypes
* feat: add parent, parenttype, idx, parentfield columns to doctypes when transitioning from normal -> child table

* fix: remove parent, parenttype, parentfield, idx from DocType DocType
2022-02-07 15:12:37 +05:30
Saqib Ansari
b42cc400b9 Merge branch 'develop' of https://github.com/frappe/frappe into link_title_refactor 2022-02-01 15:08:57 +05:30
Saqib Ansari
bd8ac90286
fix(ux): show report button on too many writes error (#15614)
* feat: log errors on too many writes to ease debugging

* fix(ux): extract and show which app/file/function caused too many writes

* fix: postgres error checking assumes exception is postgres exception

* fix: better default for skipping frames

Typically stack is like: some_app -> your_function -> this function. So last 2 frames need to be skipped.

* fix: postgres error checking assumes exception is postgres exception

* fix: better default for skipping frames

Typically stack is like: some_app -> your_function -> this function. So last 2 frames need to be skipped.

* refactor: show Report button instead of logging

* revert: unnecessary new functionality

* test: assert exact exception

Co-authored-by: Ankush Menat <ankush@frappe.io>
2022-01-31 18:57:32 +05:30
Saqib Ansari
51dcf8fd47 feat: add autocomplete option in custom fields 2022-01-29 19:16:03 +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
Saqib Ansari
30ba577c0a Merge branch 'develop' of https://github.com/frappe/frappe into link_title_refactor 2022-01-14 15:20:56 +05:30
Saqib Ansari
06b00e8e01 Merge branch 'develop' of https://github.com/frappe/frappe into link_title_refactor 2022-01-07 16:01:44 +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
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
d603aaf601 fix: define is_syntax_error for postgres 2022-01-04 11:25:08 +05:30
Rushabh Mehta
66a8e125d4 fix(ux): add "Show Dashboard" check for tab breaks 2022-01-03 13:57:36 +05:30
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
Suraj Shetty
2bde93f1a1
Merge branch 'develop' into link_title_refactor 2021-12-20 11:07:10 +05:30
Saqib Ansari
ab9700d947 Merge branch 'develop' of https://github.com/frappe/frappe into link_title_refactor 2021-12-15 19:32:16 +05:30
Diksha Jadhav
c477398a2f feat: make rating field's stars customizable with options field 2021-12-13 16:03:21 +05:30
abhishek
278883edb0 fix: missing migration hash column 2021-10-11 17:23:17 +05:30
leela
a76445bcf5 fix: use decimal digits precision 9 instead of 6 while creating schema
Currently we use DECIMAL(18, 6) datatype for float, currency and
percent. But in the system settings we provide a configuration to change the
precision up to 9 digits. This obviously does not work because we do not
store 9 digit precision in database. Fixed by changing the decimal
datatype scale.
2021-09-22 16:07:06 +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 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
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
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
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
hrwx
d056beb0ef feat: show title links in Link Fields 2021-08-03 15:55:32 +05:30