Recovery Error.

Hi Guys,

I am having a problem, after I recovered my database I keep running into this error. Its only after the terms of use box shows up. Apparently the terms of use has already been accepted before. So is this what’s generating the error? Am not sure if there is something else causing the error. Please advice.

Version Installed - 4.4.3

[2018-05-28 12:44:04] production.ERROR: Illuminate\Database\QueryException [42S22] : /public_html/ [Line 647] => SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘accepted_terms_version’ in ‘field list’ (SQL: update users set updated_at = 2018-05-28 12:44:04, accepted_terms_version = 1.0.1, accepted_terms_timestamp = 2018-05-28 12:44:04, accepted_terms_ip = where id = 1) {“context”:“PHP”,“user_id”:1,“account_id”:“1”,“user_name”:"",“method”:“POST”,“user_agent”:“Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:60.0) Gecko/2010010-----1 Firefox/60.0”,“locale”:“en”,“ip”:"-",“count”:1,“is_console”:“no”,“is_api”:“no”,“db_server”:“mysql”,“url”:“accept_terms”}

Best Regards

What do you see if you load /update

All I see is a bunch of errors. The page redirects me to accept_terms and shows a whole list of errors.

Whoops, looks like something went wrong.


SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘accepted_terms_version’ in ‘field list’ (SQL: update users set updated_at = 2018-05-28 14:50:06, accepted_terms_version = 1.0.1, accepted_terms_timestamp = 2018-05-28 14:50:06, accepted_terms_ip = ------ where id = 7)

in Connection.php (line 647)

at Connection->runQueryCallback(‘update users set updated_at = ?, accepted_terms_version = ?, accepted_terms_timestamp = ?, accepted_terms_ip = ? where id = ?’, array(‘2018-05-28 14:50:06’, ‘1.0.1’, ‘2018-05-28 14:50:06’, ‘-----’, ‘7’), object(Closure))in Connection.php (line 607)

The list is so long.

The page opens fine and I manage to log in, but once am in the dashboard the terms or use box shows up. In the background everything looks fine. When I accept the terms of use the page redirects me and shows me a whole list of errors.

Do you have command line access?

You could try running php artisan migrate

Here is a screenshot, hope this helps.

Are you able to run php artisan migrate

I not aware of artisan migrate but am looking into it right now.

Am sorry but what does php artisan migrate have to do with this?

I installed a new copy of the script since the old one was messed up for some reason. In a different directory and used the old database instead of the new one.

Why do I need to migrate the database tables when they are already there in the old database?

Did you update to/from the same version of the app?

The migrations would be needed to apply any changes from a newer version.

No I did not update to the same version rather the newer version. So this is whats causing the problem. So I have to do the migration in-order to resolve the problem between the different versions?

It could explain the problem.

Hey Hillel,

My hosting does not provide SSH access. So without SSH access I can not use command line. Is there any other way to migrate the database?

You should be able to load /update (or /public/update) to run the migrations, I’m not sure why it isn’t working for you.

Load / update how? When I tried to use the database from a recovered Invoice ninja app it keeps giving me the error. Like I sent you previously. So is there any other way I can load / update the database to the current version of Invoice Ninja app? The strange thing is that It logs me in and redirects me to the dashboard. So its only when I click on terms of use it crashes. Can you please advice?

You can load update by just going to http://yoururl/update. So based on your screenshots, it looks like that would be

Thank you so much! That fixed it… :slight_smile: