I installed Pimcore 3.1.1 and I have lot of issue with message like:
(
[message] => SQLSTATE[42000]: Syntax error or access violation: 1091 Can't DROP 'p_index_person__id'; check that column/key exists, query was: ALTER TABLE `object_store_3` DROP INDEX `p_index_person__id`;
[method] => query
[arguments] => Array
(
[0] => ALTER TABLE `object_store_3` DROP INDEX `p_index_person__id`;
)
)
(
[message] => SQLSTATE[42000]: Syntax error or access violation: 1091 Can't DROP 'p_index_person__type'; check that column/key exists, query was: ALTER TABLE `object_store_3` DROP INDEX `p_index_person__type`;
[method] => query
[arguments] => Array
(
[0] => ALTER TABLE `object_store_3` DROP INDEX `p_index_person__type`;
)
)
(
[message] => SQLSTATE[42000]: Syntax error or access violation: 1091 Can't DROP 'p_index_Options'; check that column/key exists, query was: ALTER TABLE `object_store_12` DROP INDEX `p_index_Options`;
[method] => query
[arguments] => Array
(
[0] => ALTER TABLE `object_store_12` DROP INDEX `p_index_Options`;
)
)
Same errors are reported in Pimcore forum at the bottom of the post.
Is there an issue about this ? Currently, I can't work with Pimcore. Every change in object structure corrupts the data. Any advice ?
UPDATE #001 : I have tried Johan's solutions :
First one
- Backup your entire system
- Export class defintions from within admin
- Import class definitions from within admin, save class
Second
- Export the class definitios from within admin
- Remove files in website/var/classes
- Import your class definitions again
I always have the same errors in log with alter table.
When I try to add an ObjectBricks to my object, I see this :

Thanks for your help.
Have a nice day.