On Thursday, November 8, 2012 4:02:22 AM UTC-8, desbest wrote: > > DB["ALTER TABLE `users` AUTO_INCREMENT = 6"] does not work > > When I create a new user, the id column which has a primary key, should be > 6, after that query is executed, and not 8, 9 or 10. > > I want to be able to delete users, and keep the 1..2..3.. incrementing > orders of numbers intact. >
My guess is you are not actually running that query. DB#[] creates a dataset, it not execute a query. For what you are doing, you want Database#run. In situations like this, where Sequel is not working the way you expect, the first thing you should do is add an SQL logger to the database (DB.loggers << Logger.new($stdout)). In this case, that would have made it obvious that no query was being sent. Thanks, Jeremy -- You received this message because you are subscribed to the Google Groups "sequel-talk" group. To view this discussion on the web visit https://groups.google.com/d/msg/sequel-talk/-/YEjC9sy3JWoJ. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/sequel-talk?hl=en.
