You don't have to have manually done anything in the database. As soon as the new schema upgrade scripts were uploaded to the web site, and the site encountered a SQL exception in a mojoPortal core table, it would have immediately run the DB upgrade process (the same one that runs when you visit /setup/default.aspx after uploading new release files, as documented in the Upgrading From Previous Versions document).
Once the DB upgrade process has been run, the only way to go backward would be to go through all of the SQL scripts under /Setup/Applications/.../SchemaUpgradeScripts/[dbtype], and try to figure out a way to manually reverse what each one of them did, starting with 2.3.9.7 and working backwards through 2.3.6.6. It's theoretically possible to do this, unless any of the scripts include one-way transformations or data conversions that can't be undone. Just to give you an idea of what would be involved, mojoportal-core alone has 32 SQL scripts that would have run during an upgrade from 2.3.6.5 to 2.3.9.7.
I used "..." in the above path, because in addition to mojoportal-core, you'd have to go through the same process for every other feature delivered by mojoPortal. And of course, your site will have to be kept down while this process is worked through.
Because of the colossal amount of worked involved, and no guarantee of ultimate success, my recommendation would be to restore the files for 2.3.9.7 and try to work through any issues you have found, by posting specific problems here on the forum. Don't forget to make any necessary skin changes as listed in the Important Skin Changes document.
Sorry I don't have better news for you.