flamerobin icon indicating copy to clipboard operation
flamerobin copied to clipboard

Fix inconsistency in the pattern in the INDEX/PK/FK/UNQ/CHK name generator

Open arvanus opened this issue 4 years ago • 2 comments

Currently, the INDEX name generated isn't standardized with the other objects, image image -Absence of underscore at the index sequence suffix -Unique and check starts counting at 0 instead of 1 like indexes and FKs

Also, I would like to propose the possibility to choose between KIND_TABLENAME_%d(current) or TABLENAME_KIND%d or TABLENAME_KIND_%d in the object name generator Example: FK_FB3_TEST_1 or FB3_TEST_FK1 or FB3_TEST_FK_1 IDX_FB3_TEST_1 or FB3_TEST_IDX1 or FB3_TEST_IDX_1 The second pattern is used by other softwares too, but won't be the default in Fr, or even allow the user to personalize the desired pattern in the Preferences, this is possible, but the restriction is that the sequence must go after the table name ( %s %d) See: https://github.com/mariuz/flamerobin/blob/fa4e3d5f31f4b9f4d13d9bb0905821a3e15c368c/src/gui/CreateIndexDialog.cpp#L119-L120

I'm not 100% sure of which pattern follow, of allow the user to use the pattern he already uses in the given database

Any advices from the users? Thanks

arvanus avatar Jun 21 '21 14:06 arvanus

Hi @arvanus

I think that the pattern that the user wants to use should be added to the configuration. For the default pattern, my vote is for TABLENAME_KIND%d starting in 0

./jo

Jdochoa avatar Jun 21 '21 18:06 Jdochoa

My vote is also for TABLENAME_KIND_<autoIncStarfrom_1>

Best Regards, Luciano

luronumen avatar Jun 21 '21 21:06 luronumen