oracle-enhanced icon indicating copy to clipboard operation
oracle-enhanced copied to clipboard

Use default_sequence_name to identify sequence when rename a table

Open chriger opened this issue 3 years ago • 1 comments

I encountered a problem when renaming a table with a sequence that has a shortened table name in it to meet the 30 character limit.

Because errors when renaming a sequence are rescued with nil i recognized the error after executing the migration on my running test environment.

Example: Table name: HERE_IS_MY_LOOONG_TABLE_NAME Sequence name: HERE_IS_MY_LOOONG_TABLE_NA_SEQ

When executing a rename as follow:

rename_table :here_is_my_looong_table_name :short_table_name

The adapter try to change a sequence named HERE_IS_MY_LOOONG_TABLE_NAME_SEQ instead of HERE_IS_MY_LOOONG_TABLE_NA_SEQ

chriger avatar Mar 30 '22 08:03 chriger

Thank you for opening a pull request. Would you add some specs for this change?

yahonda avatar Jun 07 '22 12:06 yahonda