Forum: Ruby on Rails Simple Database Problem

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
9208668829357697cffa6d18ce58703a?d=identicon&s=25 The iGuy (Guest)
on 2007-05-16 08:23
(Received via mailing list)
I have a question about auto generated primary keys. For example
rails' session table in MySQL uses an int(11) with auto_increment. If
the application is used a lot wouldn't the id key run out of keys
eventually? How do you deal with this problem in general, not just for
the session table.

Do you run a clean up script in an interval witch drops the table and
recreates it?
If so what if the tables data is important?

Or do you create your own keys?
If so how do you create a unique key?

I know this is a vague question an the answer could get complicated
but I thank anyone for any help here.

This topic is locked and can not be replied to.