I need help figuring out how to troubleshoot the situation I’ve gotten myself into. I think I fratzed my database somehow.
MY SETUP
Have EE 1.6.8 running in MAMP environment on MacOS 10.5 computer.
Install is a sandbox-y version of a site that’s also live. I play with it on MAMP, figure stuff out, then duplicate efforts on live site.
WHAT I DID
Today I added some new fieldgroups, some new fields, two new weblogs, one new category group.
THE CRASH. SOME DETAILS
In midst of doing first test publish to 1 of new weblogs (with new field group, etc.), I managed to crash Safari browser (Safari crashes happen often enough due to ridiculous # of windows/tabs I keep open. Yeah, I’m weird. Don’t really flinch at this browser crash because they’ve happened before.) Incidentally, this crash happened when I attempted to do file upload inside of image matrix on the publish page.
Somehow that browser crash was bad enough to bring many things down. Couldn’t force quit Safari, nor another app. I shut down as many apps as I could (including MAMP, VirtualHostX) and tried to reboot system (terminal: sudo shutdown -r now), but computer wouldn’t shutdown. Hence: press powerbutton. Ow, that was a bad one.
THE CONDITIONS OF THINGS AFTER RESTART
Restarted, launched MAMP, VirtualHostX, and set about starting again where I left off.
Except all the fields I created in today’s session are not there.
Wha—??
So I go about attempting to re-create my work.
Create new fieldgroup (ok)
a) Create new field.
After filling out the items for a new text field, I click Submit button.
Result: Error message:
MySQL ERROR:
Error Number: 1060
Description: Duplicate column name ‘field_id_43’
Query: ALTER TABLE exp_weblog_data ADD COLUMN field_id_43 text NOT NULL
The strange thing, though, is that the field did get added OK, despite the message.
b) Did that again with a new text area field.
Got similar message, but it did get created okay.
c) Now attempting to create third field, a Matrix field. Complete the process, click Submit.
Error message
MySQL ERROR:
Error Number: 1060
Description: Duplicate column name ‘col_id_16’
Query: ALTER TABLE exp_matrix_data ADD col_id_16 TEXT
But this time, the new field did NOT get created.
FROM THIS POINT, WHERE DO I TROUBLESHOOT?
Do I hang out in phpmyadmin/ mySQL and do things like check/repair/analyze/of flush the tables?
I have not been backing up this local MAMP-based database by doing periodic SQL dumps.
However, I have been backing it up through regular backups. (I guess if I wanted to make a really clean roll back, I could get the disk image from last backup of /Applications/MAMP/db/mysql/ee_thisdatabase and roll back to that point.)
Any advice for what to do would be greatly appreciated.