Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

max identifier length changed to 63 #6337

Merged
merged 7 commits into from
May 30, 2023
Merged

Conversation

alidevhere
Copy link
Contributor

  • [x ] Do only one thing
  • [ x] Non breaking API changes
  • [ x] Tested

What did this pull request do?

default max identifier length changed to 63

See issue here
It adds max Identifier Length in Naming strategy which can be overridden by individual drivers of gorm.

User Case Description

@alidevhere
Copy link
Contributor Author

@jinzhu once these changes are merged i will create pull request in all drivers to support this change.
Thanks

@jinzhu
Copy link
Member

jinzhu commented May 21, 2023

Hi @alidevhere

Thank you for the max length support, but maybe we should keep the old configuration by default to make sure old applications not using Postgres don't break.

@alidevhere
Copy link
Contributor Author

alidevhere commented May 21, 2023

Hi @alidevhere

Thank you for the max length support, but maybe we should keep the old configuration by default to make sure old applications not using Postgres don't break.

@jinzhu Should we change default max length identifier to old 64 instead of 63 ?

@jinzhu
Copy link
Member

jinzhu commented May 22, 2023

Hi @alidevhere
Thank you for the max length support, but maybe we should keep the old configuration by default to make sure old applications not using Postgres don't break.

@jinzhu Should we change default max length identifier to old 64 instead of 63 ?

Better to keep the current setting to keep compatibility.

alidevhere and others added 6 commits May 30, 2023 06:34
* Added support of "Violates Foreign Key Constraint"

Updated the translator and added the support of "foreign key constraint violation". For this, this error type is needed here.

* changed the description of ErrForeignKeyViolated
Co-authored-by: Saeid Saeidee <s.saeidee@sensysgatso.com>
…red Statements (go-gorm#6220)

* test: add nested transaction and prepareStmt coexist test case

note: please test in the MySQL environment

Change-Id: I0db32adc5f74b0d443e98943d3b182236583b959
Signed-off-by: 王柳洋 <wangliuyang.520@bytedance.com>

* fix(nested transaction): SavePoint SQL Statement not support in Prepared Statements

1. SavetPoint SQL Statement not support in Prepared Statements
 e.g. see mysql8.0 doc: https://dev.mysql.com/doc/refman/8.0/en/sql-prepared-statements.html

Change-Id: I082012db9b140e8ec69764c633724665cc802692
Signed-off-by: 王柳洋 <wangliuyang.520@bytedance.com>

* revert(transaction_api): remove savepoint name pool,meaningless

Change-Id: I84aa9924fc54612005a81c83d66fdf8968ee56ad
Signed-off-by: 王柳洋 <wangliuyang.520@bytedance.com>

---------

Signed-off-by: 王柳洋 <wangliuyang.520@bytedance.com>
Co-authored-by: 王柳洋 <wangliuyang.520@bytedance.com>
@alidevhere
Copy link
Contributor Author

Hi @alidevhere
Thank you for the max length support, but maybe we should keep the old configuration by default to make sure old applications not using Postgres don't break.

@jinzhu Should we change default max length identifier to old 64 instead of 63 ?

Better to keep the current setting to keep compatibility.

@jinzhu Changes reverted to current settings. Ready for review

@jinzhu jinzhu merged commit 26663ab into go-gorm:master May 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants