sequence and auto

by sylvie
Tuesday, June 27, 2006
Posted to sylvie's Blog
From irc

(18:14:08) Evolution: stupid question, but I'm working on a new plugin for bw, and I'm trying to wrap my mind around everything in the sample package.
(18:14:44) Evolution: in the admin/schema.inc.php, why is the sequences statement commented out, and what is its purpose?
(18:15:00) Evolution: it's not commented out in other modules, like blogs or fisheye.
(18:17:28) Hash9: I think it gives a cross database way of using a auto_number type feild, where you can get the next number in the sequence
(21:00:08) spiderr: Evolution, IMHO, AUTO sucks. I prefer sequences because you have precise control
(21:00:36) Evolution: spiderr: so you're saying leave the sequences disabled then?
(21:01:04) Evolution: spiderr: I'm just not entirely sure what that call does.
(21:01:27) spiderr: i would recommend removing AUTO and use a sequence instead
(21:01:50) Evolution: if that's the case then why is sequence commented out to begin with?
(21:02:02) spiderr: that call should create the sequences for you. but if you have an AUTO increment column, you don't need a sequence