Hello,
I upgraded my installation of Invoice Ninja through Softaculous today to version 3.0.3
Now getting this error when loading the main page
SQLSTATE[HY000]: General error: 1215 Cannot add foreign key constraint (SQL: alter table accounts
add constraint accounts_company_id_foreign
foreign key (company_id
) references companies
(id
) on delete cascade)
Nevermind, fixed by adding APP_CIPHER=rijndael-128 to env file
Had to reset password to get into the account, now on the dashboard I just get this message
Whoops, looks like something went wrong.
Tried to fix this
by commenting out the contents of the up function (lines 15 to 52) and loading /update again.
Now getting the error below
SQLSTATE[42S21]: Column already exists: 1060 Duplicate column name ‘refunded’ (SQL: alter table payments
add refunded
decimal(13, 2) not null, add payment_status_id
int unsigned not null default ‘4’, add routing_number
int unsigned null, add last4
smallint unsigned null, add expiration
date null, add gateway_error
text null, add email
varchar(255) null, add payment_method_id
int unsigned null)
Ok I managed to get the site to update and load by commenting out lines in *_payments_changes.php in migrations folder.
My question is this do I have to keep all those lines commented out?
Or can I put it back the way it was?
I did put it back the way it was
and I’m already on the new version and loaded /public/update again but I’m seeing errors there
Is the database ok after doing all this? and will I be able to update to new version in the future?
hillel
February 4, 2017, 5:26am
6
If you see errors when loading /public/update then you’ll likely see more problems.
Have you moved to a different server? The default table type in MySQL was changed to InnoDB which we’ve seen cause this problem. If that’s the case you can fix it with this query:
https://www.invoiceninja.com/forums/topic/problem-with-new-install/#post-5313