Topic: Database errors after upgrade?

After an upgrade that another admin did on my forums from (i believe 1.2 to 1.2.15) it appears my Categories and Forum tables in the DB were both messed up (the forums were also transfered from a shared host to my dedicated server).

Everytime I'd create a Category or Forum their ID in the database would be '0', while my existing categories or forum ID's were all '5', '6', etc higher than the new ID's that kept being created as 0.

If I modified the ID's to 1 digit above the existing ID's, PunBB would work fine, otherwise it would error out saying the link was invalid.

I finally modified the ID structure in the DB for Categories, and forums to autoincrement the ID and that appears to have fixed the problem on those two tables when creating or modifying their records. New records are incremented correctly to later ID#'s.

Was this correct?

Are there any other ID fields that should be set to auto increment?

I checked the upgrade script too and it appears the 1.2.15 changes to the DB did go into effect, but none of those had ID structure changes.

Thanks.

Re: Database errors after upgrade?

Hmm, I ran into the same issue with the user related tables needing Auto Increment.

Any chance there's a handy reference of the DB structure or what tables require auto increment?

Re: Database errors after upgrade?

I don't think the database change was related to an upgrade, it sounds like you did a bad import

And as for auto-incrementing columns:
http://punbb.org/docs/dev.html#dbtables
search the page for auto-incrementing

Re: Database errors after upgrade?

Awesome, thanks for the link Smarty's. I caught a couple more tables I needed auto incrementing on.

The guy that did the sql dump for me definately didn't check off the right settings to include those then. I should be all fixed up now.

Kudo's on PunBB too, I run the bigger boards like VB but think PunBB fills a really great no-fills (aka feature bloat) void out there.