rsim/oracle-enhanced — Issue #145: default_sequence_name is truncating "too soon"
Author: fabiob
Created: 2012-02-03 03:35:38+00:00
State: open

There's a TODO on the code:

`# TODO: remove schema prefix if present before truncating`

I fixed it by monkey patching, here's the code, you might find it useful. I changed:

`"#{table_name.to_s[0,IDENTIFIER_MAX_LENGTH-4]}_seq"`
to
`table_name.gsub /(^|\.)([\w_]{1,#{IDENTIFIER_MAX_LENGTH}})([\w_]*)$/, '\1\2_seq'`