# How to change the default naming schema for indeces in the '

**URL:** <https://www.ruby-forum.com/t/how-to-change-the-default-naming-schema-for-indeces-in-the/115677>\
**Category:** Rails\
**Created:** [September 27, 2007, 3:10pm UTC](https://www.ruby-forum.com/t/how-to-change-the-default-naming-schema-for-indeces-in-the/115677 "2007-09-27T15:10:42Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mauricefaeh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/a587f6/32.png) [@mauricefaeh](https://www.ruby-forum.com/u/mauricefaeh)\
**Post date:** [September 27, 2007, 3:10pm UTC](https://www.ruby-forum.com/t/how-to-change-the-default-naming-schema-for-indeces-in-the/115677/1 "2007-09-27T15:10:42Z")

</div>

Hi all

I’m using rails on a legacy environment with Oracle 10g. Now I want to  
move to the database based session store. BUT I’m running into a  
problem:

a) I’m using rails table\_name prefixes:  
config.active\_record.table\_name\_prefix = “c2003\_tv\_”

# b) It seems that during the migration rails automatically wants to create a index on the session\_id column, which it can’t: == Session: migrating

– create\_table(:session)  
-\> 0.0269s  
– add\_index(:session, :session\_id)  
rake aborted!  
OCIError: ORA-00972: identifier is too long: CREATE INDEX  
index\_c2003\_tv\_session\_on\_session\_id ON c2003\_tv\_session (session\_id)

How can I change the default naming schema for indeces on the  
‘session’ table? Or any other suggestion?
