seitime-frappe/frappe/model
Ritwik Puri b41379c78b
fix: misc fixes (integer primary keys) (#16307)
* fix: misc fixes

local.x gets resetted on every request so switched to a simple dict

simplified is_val_used in set_next_val function for sequences

* chore: use multisql for sequence methods

* fix: fields not updating on form

* minor(base_input): removed unnecessary branching in update_input

* chore: remove prints and rename autoincremented_status_map

* chore: added proper type hint + comment + formatting

* fix: added searching in cast_name rather than handling it manually

* fix: share condition query + test_build_match_conditions

* fix: add cast_name to more places

* test: test for sequence

* fix: sequence functions

* fix: inherit frappetestcase

* minor: attach sequence methods to db context local

* chore: update sequence function names in Database

use frappe.db for sequences in naming.py

* fix: convert filename to str (for autoincremented doctypes)

* chore: better regex for modifying values for postgres

* minor: allow changing name column type (if no data is present in the doctype)

* refactor: validate_autoname

converted it to a simple function
enabled changing autoincrement autoname from customize form

* fix: use sql_ddl for change_column_type in postgres

* fix: use not null constraint in postgres when changing name type

* fix(test): updated test_autoincremented_doctype_transition with transitioning when no data is present

* fix(test): updated test_cast_name

probably messed up during rebase

* fix(test): used rollback upon error in transaction for postgres

* chore: use frappe.db.x methods for sequences

* minor: use temporary sequences in test

* minor: use generate_hash for sequence naming in sequence tests

* chore: replace sequence imports with frappe.db.x

* chore: move out casting name fields to a separate method

* refactor: cast_name

more explicit cases for casts and added docstring

* fix: added space in test_cast_name

* chore: fix linter

* chore: better naming for can_change_name_column_type

* chore: add comment for autoincremented_site_status_map

* chore: update/add docstrings
2022-04-29 15:06:03 +05:30
..
utils style: format all python files using black (#16453) 2022-04-12 10:59:25 +05:30
__init__.py Merge pull request #15538 from noahjacob/phone_field_control 2022-04-28 10:27:52 +05:30
base_document.py Merge pull request #15538 from noahjacob/phone_field_control 2022-04-28 10:27:52 +05:30
create_new.py style: format all python files using black (#16453) 2022-04-12 10:59:25 +05:30
db_query.py fix: misc fixes (integer primary keys) (#16307) 2022-04-29 15:06:03 +05:30
delete_doc.py style: format all python files using black (#16453) 2022-04-12 10:59:25 +05:30
docfield.py style: format all python files using black (#16453) 2022-04-12 10:59:25 +05:30
docstatus.py feat: utility methods for docstatus (#15515) 2022-02-04 07:41:25 +00:00
document.py Merge branch 'develop' of github.com:frappe/frappe into bg-rename_doc 2022-04-20 16:04:27 +05:30
dynamic_links.py style: format all python files using black (#16453) 2022-04-12 10:59:25 +05:30
mapper.py style: format all python files using black (#16453) 2022-04-12 10:59:25 +05:30
meta.py Merge branch 'develop' of https://github.com/frappe/frappe into phone_field_control 2022-04-14 14:19:35 +05:30
naming.py fix: misc fixes (integer primary keys) (#16307) 2022-04-29 15:06:03 +05:30
rename_doc.py fix: Generate hash of length 8 for save point 2022-04-20 16:41:25 +05:30
sync.py style: format all python files using black (#16453) 2022-04-12 10:59:25 +05:30
workflow.py fix(linting): no single quotes :'| 2022-04-18 17:29:03 +05:30