Dear all, I just created session with rake db:sessions:create and run the migration also. When I run my apps, my db barfed out saying that the length of session_id is too long. When I checked into my db, the length of session_id column in the sessions table, it was 255 of character varying. I then changed it to 500 character varying and it works. But that would be too long. Does anybody know the exact length of this field? Thank you in advance. -- If you can''t believe in God the chances are your God is too small. Read my blog: http://joshuajava.wordpress.com/ Follow us on twitter: http://twitter.com/scrum8 --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Hi there, Not a DB expert but as far as I understand when you have a "varying" field you are telling the DB how long the data in the field/column **could be**. If you put a value that is shorter than the maximum possible length the DB should arrange the storage for as much data as you put in the field and no more, so ''extra empty space'' is not wasted. In other words, I think you should be fine, especially if you clean up session information as sessions expire. Pepe On May 5, 3:42 am, Joshua Partogi <joshua.j...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Dear all, > > I just created session with rake db:sessions:create and run the migration > also. When I run my apps, my db barfed out saying that the length of > session_id is too long. When I checked into my db, the length of session_id > column in the sessions table, it was 255 of character varying. I then > changed it to 500 character varying and it works. But that would be too > long. Does anybody know the exact length of this field? > > Thank you in advance. > > -- > If you can''t believe in God the chances are your God is too small. > > Read my blog:http://joshuajava.wordpress.com/ > Follow us on twitter:http://twitter.com/scrum8
On May 5, 8:42 am, Joshua Partogi <joshua.j...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Dear all, > > I just created session with rake db:sessions:create and run the migration > also. When I run my apps, my db barfed out saying that the length of > session_id is too long. When I checked into my db, the length of session_id > column in the sessions table, it was 255 of character varying. I then > changed it to 500 character varying and it works. But that would be too > long. Does anybody know the exact length of this field? >It''s not normally anywhere near that long. if you are moving from an app that was using the cookiestore session storage then you''ll need to clear out the sessions (because with the cookie store the session id is the session data) Fred> Thank you in advance. > > -- > If you can''t believe in God the chances are your God is too small. > > Read my blog:http://joshuajava.wordpress.com/ > Follow us on twitter:http://twitter.com/scrum8