I''m trying to execute a simply change_column on oracle, with the following output: -- change_column(:comments, :text, :string, {:limit=>1000}) rake aborted! An error has occurred, this and all later migrations canceled: Index name ''temp_index_altered_comments_on_commentable_id_and_commentable_type'' on table ''altered_comments'' is too long; the limit is 64 characters How do I specify the name of the temporary index in the migration? -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Mon, Aug 15, 2011 at 1:41 PM, theLemcke <sixtimesnine-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Index name > ''temp_index_altered_comments_on_commentable_id_and_commentable_type'' > on table ''altered_comments'' is too long; the limit is 64 characters > > How do I specify the name of the temporary index in the migration?e.g. add_index :things , :thing_id , :name => ''thing_index'' -- Hassan Schroeder ------------------------ hassan.schroeder-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org http://about.me/hassanschroeder twitter: @hassan -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Yes, but how do I do this with change_column? On Aug 15, 1:53 pm, Hassan Schroeder <hassan.schroe...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On Mon, Aug 15, 2011 at 1:41 PM, theLemcke <sixtimesn...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > Index name > > ''temp_index_altered_comments_on_commentable_id_and_commentable_type'' > > on table ''altered_comments'' is too long; the limit is 64 characters > > > How do I specify the name of the temporary index in the migration? > > e.g. > > add_index :things , :thing_id , :name => ''thing_index'' > > -- > Hassan Schroeder ------------------------ hassan.schroe...-Re5JQEeQqe80Tx58lXaADg@public.gmane.org://about.me/hassanschroeder > twitter: @hassan-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Mon, Aug 15, 2011 at 3:06 PM, theLemcke <sixtimesnine-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Yes, but how do I do this with change_column?No idea, and I doubt you can :-) Can you post the migration itself and the current schema for the table? -- Hassan Schroeder ------------------------ hassan.schroeder-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org http://about.me/hassanschroeder twitter: @hassan -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
You know what? Nevermind. Turns out that table is deleted later in my migrations, so I''ll just comment this line out. Still would like to know how to do this, if it''s even possible. On Aug 15, 3:17 pm, Hassan Schroeder <hassan.schroe...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On Mon, Aug 15, 2011 at 3:06 PM, theLemcke <sixtimesn...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > Yes, but how do I do this with change_column? > > No idea, and I doubt you can :-) > > Can you post the migration itself and the current schema for the table? > > -- > Hassan Schroeder ------------------------ hassan.schroe...-Re5JQEeQqe80Tx58lXaADg@public.gmane.org://about.me/hassanschroeder > twitter: @hassan-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Aug 15, 6:58 pm, theLemcke <sixtimesn...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> You know what? Nevermind. Turns out that table is deleted later in my > migrations, so I''ll just comment this line out. Still would like to > know how to do this, if it''s even possible.It looks like the issue is an index established earlier on commentable_id and commentable_type - Oracle appears to be *copying* the whole deal to a temporary table (altered_comments) along with the indexes. I suspect the only solution would be to shorten the name of the index on the original table before doing the change_column... --Matt Jones -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.