Forum

Ask, reply and learn. Join the community of Akaunting.

New Discussion

Update 2.1.19 to 2.1.25: Struggeling but fixed in the end

Sozis Für Tiere   ( User )

Commented 3 years ago

So I just want to express the problems I encountered while updating from 2.1.19 to 2.1.25.

I did this and ran into a stucked at 80% updating and freezing. So, when you go to another page it says 2.1.25 in the footer, but I encountered a lot of sql errors, so, not usable at all.

Tried a few things of https://akaunting.com/forum/discussion/installation-update/error-after-upgrade-to-2120-need-help but that didn't helped when I needed to create a new company (which I need to do to debug another error with mt940 import app).

So, from https://github.com/akaunting/akaunting/releases I downloaded the "-Stable.zip" related to my database backup.

ps: In the database is a "_migrations" table, where you can see what the latest migration has been.

So my install was before in "aka", I moved that to "aka_old" and unziped the new installation in "aka" again.

Okay, I then created a new database, imported my dump via phpmysqladmin, while doing so I had to deactivate the foreign key check.

Now, I copied the ".env" file from "aka_old" to "aka" and changed the database name to my new database. Used the same username/password, so I haven't had to change that.

Now starting loading aka.example.org I ran into an error, so I had to run this sql statement first:
"ALTER TABLE yma_media ADD COLUMN company_id int(10) unsigned default 0;"

I then started the update and it failed again [READ what happens then before doing so]:

80%
The command /usr/local/bin/php artisan update:finish core 6 2.1.25 2.1.19 failed.

Exit Code: 1(General error)

Working directory: /home/xxx/subdomains/aka

Output:
================
Finishing update...
Application cache cleared!

In Connection.php line 692:

SQLSTATE[42S21]: Column already exists: 1060 Duplicate column name company
_id (SQL: alter table `yma_media` add `company_id` int unsigned not null d
efault 0 after `id`)


In Connection.php line 485:

SQLSTATE[42S21]: Column already exists: 1060 Duplicate column name company
_id




Error Output:
================



And the new install was corrupted, so I had to do this again. I then clicked on update again and while it was downloading files/extracting I had to drop that COLUMN again I needed to create to have access to the app:

ALTER TABLE xxx_media DROP COLUMN company_id;
(xxx = prefix obviously).

I now do an database dump, just to be sure and also make a debug of the files.

Maybe it is wise to buy import/export app, do an export, make a fresh install and import that export, cuz maybe my structure is somewhere corrupted from earlier updates and in using the import/export app I could get the data in a well structured database.

Maybe this helps someone

Please login or register to leave a response.

Showing 1 to 1 of 1 discussions