Consistency errors in database table after upgrade to SQL Server 2012
Hm... That's interesting...

So the index is somehow corrupted before the upgrade and when you see an error as above you can both fix this before and after upgrading, but only after upgrading DBCC will detect the problem.

Steps:


Figure out which index is failing


Run DBCC CHECKDB to get a column name.
Find index that spans over this column (for me it was a primary key).

Disable index: ALTER INDEX [my index name] ON [my table name] DISABLE; (some foreign keys might be disable along with it, don't worry about that).
Rebuild/re-enable index: ALTER INDEX [my index name] ON [my table name] REBUILD;.
Run DBCC CHECKDB; to make sure everything is fine.


That worked for me but YMMV. Again, you can do above in MS SQL 2008 R2 and then restore fresh backup on MS SQL 2012 or do above when already on MS SQL 2012.