mariuz / flamerobin

FlameRobin is a database administration tool for Firebird RDBMS. Our goal is to build a tool that is: lightweight (small footprint, fast execution) cross-platform (Linux, Windows, Mac OS X, FreeBSD) dependent only on other Open Source software
http://flamerobin.org
MIT License
214 stars 66 forks source link

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

Open arvanus opened 3 years ago

arvanus commented 3 years ago

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

Jdochoa commented 3 years ago

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

luronumen commented 3 years ago

My vote is also for TABLENAMEKIND

Best Regards, Luciano