By rengomez on
Hello
I have 2 nodes numbered 6 and 7. Due to much testing of import / export, the next node starts at 380. I would like to reset this to 8 for my next node. There is an article explaining how to update the sequences table but this does not exist in my MYSQL DB and I think it is therefore referring to an older version of drupal.
If possible can you post the MYSQL Syntax so I can log into my DB and execute it direct.
Thanks
naRen
Comments
ALTER TABLE `node`
ALTER TABLE `node` AUTO_INCREMENT=8phpMyAdmin
also you can use phpMyAdmin
- go to table
node- go to tab
Operations- look into the group
Table optionsthere is a textfieldAUTO_INCREMENTwith your current auto increment value- change it to what ever you want (ensuring it is a valid available id)
- submit with its
GobuttonphpMyAdmin
THAT worked perfectly, thanks. Note that you cannot set the value to less that the latest value that's in there. So although I do not have a /node/1, I can only reset to a minimum of 8 as my last node is /node/7
Thanks again!
naRen
Thank you
Thanks arhak,
This works, perfect.
Regards,
Daniel
What if...
I have node ID 7 and 9,
and then I set my auto increment to 8, will this operation bypass node ID 9 and then automatically name my node to 10?
wise
AFAIK if the table has an ID 9, then the minimum for the auto increment will be 10,
if you try to set it lower it makes it 10 anyway, so nothing brakes (and 8 won't be used)
Wait
Doesn't that means that the easyest way would be to allwas set increment to 0?
like:
ALTER TABLE `node` AUTO_INCREMENT=0
do you mean...
do you mean to ensure the lowest value will be given?
I guess it will do
arhak's tip also works great
arhak's tip also works great for me.
I reset from 308 to 1.
If you try 0, it refreshes and nothing happens. It gives no error and your number remains the same.
MySQL 5.1.47