Гость
24 Май 2013 04:20

I cloned a cobalt site and deleted all the categories (I had a lot of them) now if I create a new category the category ID start again from 103... I'd like it to start again from 1

is this someway possible to reset the category ID start number, maybe in phpmyadmin?

Последние изменения: 02 Март 2014


Konstantin
Total posts: 1,113
24 Май 2013 04:51

You can read about this here


Гость
24 Май 2013 04:56

Thanks, which table do I have to modify exactly for cobalt 8 ?

in res_categories table I don't see any "auto increment" column or value

do I have to add it?


Sergey
Total posts: 13,748
24 Май 2013 06:34

This is primary key. You cannot create 2 categories with the same primary key. Why do you need 1 again? Why next number is not good?


Гость
24 Май 2013 07:21

Why do you need 1 again? Why next number is not good?

well, it's just because this is a new site and I would prefer not to start with "103-category name" in the URLs... but I guess it's not so important... I was just wondering if it was possible to reset that number


Sergey
Total posts: 13,748
24 Май 2013 07:26

Yes but this is complicated. You have to run TRUNCATE comamnd on the table and then insert ROOT category with ID 1. You can find SQL in sql/install.utf8.sql file in cobalt backend.

In fact you can just delete this table and then run create table SQL and insert ROOT category SQL.


Гость
24 Май 2013 07:51

done! it was not so complicated... thank you


Sergey
Total posts: 13,748
24 Май 2013 07:59

Then you are simple very clever man :)

Работает на Cobalt