nuodb / migration-tools

Migration tools for NuoDB
http://nuodb.github.com/migration-tools/
BSD 3-Clause "New" or "Revised" License
27 stars 10 forks source link

Generate human readable names for sequences #11

Closed akshah123 closed 11 years ago

akshah123 commented 11 years ago

At present, all sequences created have random alpha-numeric name. Instead of this, it would be much better if it created names based on table & field name.

For example, a table called "user" with auto increment field named "id", should have a sequence name such as user_id or something similar. By following a convention of {tablename}{field_name}, it should produce unique sequence names while keeping them human readable.

plothridge commented 11 years ago

This is being tracked in the Migrator JIRA queue as CDMT-94. Notification on changes will be made here. Thank you for contributing your suggestion.

tazija commented 11 years ago

Sequences are generated as SEQ{table}{column}, indexes as IDX{UNIQUE}{table}{column1}{column2}, foreign keys as FK_{primarytable}{primarycolumn1}{primarycolumn2}{foreigntable}{foreigncolumn1}{foreign_column2}