The content database was detached from SQL server by mistake while site collection upgrade was running, now the database is attached again and the site still showing upgrade in progress but opening the log file shows the last action happened before the detach happened. I'm afraid that the upgrade is stuck. Is there's a way to check if the upgrade continued and working or not?
You could either try to start the timer job for the specific web application where the content database is attached to. I think the timer jobs name is "Upgrade Site Collections job" or something similar and see if anything changes.
EDIT: Seems like this job is set to run every minute by default.
Upgrade site collections - Upgrades site collections in a content database. Every 1 minute.
Or you could try to update the site collection again with PowerShell.
Upgrade-SPSite http://<site name>/sites/testsite
If that does not work, try to add the