It looks to me like you’re trying to install 1.8 in to your 1.7 database (the structure.sql file isn’t used on an upgrade).
You need to restore your pre-upgrade backup of 1.7.9, and then upgrade using the upgrade routine, rather than trying to install a fresh install in to an existing database.
You would restore your pre-upgrade backup, so the database is back at v1.7.9, then extract your 1.8.2 files, and copy the settings.php from 1.7.9 install in to the web/ folder of your 1.8 install. Then browse to the webpage, and it will give you a login prompt, and then take you through to the upgrade. The process is detailed in the release notes.