4 ms·
ALTER TABLE twits MODIFY COLUMN twitid BIGINT UNSIGNED NOT NULL There, fixed, send check for $20 to donations@redcross.org Call me back when they reach 184467
by TweedHeads 17y ago
ALTER TABLE twits MODIFY COLUMN twitid BIGINT UNSIGNED NOT NULL
There, fixed, send check for $20 to donations@redcross.org
Call me back when they reach 18446744073709551615
- sanj 17y agoAssuming that Rails is still interacting with the DB, and the ID in question is the primary key (ie, the 'id' on the 'twits' table) isn't quite that easy. I had to do this a couple of years back when I realized I had a table that'd grow quickly: http://snippets.dzone.com/posts/show/4422 http://snippets.dzone.com/posts/show/4422 Feel free to send the donation to the same place.
- fleaflicker 17y agoThat command will take several hours to complete and write lock the table.
- TweedHeads 17y agoNothing the fail whale can't fix ;-)
- jsonscripter 17y agoWhy can't you just redirect the writes to a new temporary table and join the original and temporary on reads? (I'm not a database admin)
- karanbhangui 17y agoI'm actually interested in this answer as well. I know of a company using a proprietary db and now that their growth has literally exploded, they're stuck with it.
- jsonscripter 17y agoI wonder what literally exploding growth looks like...
- blhack 17y agohttp://dhawhee.blogs.com/d_hawhee/files/109_fake_tits_real_beer.m4a http://dhawhee.blogs.com/d_hawhee/files/109_fake_tits_real_b...
- Andys 17y agoUnless you use PostgreSQL. But then you would have had 64 bit ID by default anyway.
- joezydeco 17y agoHmm, didn't fix my iPhone client. Try again!