issue after updating 2.5.0.3 -> v2.8.1

when you say ‘the migration file’, u mean any of the migration files in database/migrations correct? Should I comment out foreign keys for the migration file where the error seems to occur?

Exactly, in database/migrations/2016_03_22_168362_add_documents.php

okay have commented out foreign keys in the migration files for these errors. Last error is not about foreign keys. should i comment out the altering of the table accounts?

SQLSTATE[HY000]: General error: 1005 Can’t create table ninja.#sql-2d94_30b4 (errno: 150 “Foreign key constraint is incorrectly formed”) (SQL: alter table documents add constraint documents_account_id_foreign foreign key (account_id) references accounts (id) on delete cascade)

SQLSTATE[HY000]: General error: 1005 Can’t create table ninja.#sql-2d94_30b6 (errno: 150 “Foreign key constraint is incorrectly formed”) (SQL: alter table companies add constraint companies_payment_id_foreign foreign key (payment_id) references payments (id))

SQLSTATE[HY000]: General error: 1005 Can’t create table ninja.#sql-2d94_30b8 (errno: 150 “Foreign key constraint is incorrectly formed”) (SQL: alter table expense_categories add constraint expense_categories_account_id_foreign foreign key (account_id) references accounts (id) on delete cascade)

SQLSTATE[42S21]: Column already exists: 1060 Duplicate column name ‘page_size’ (SQL: alter table accounts add page_size varchar(255) not null default ‘A4’, add live_preview tinyint(1) not null default ‘1’, add invoice_number_padding smallint not null default ‘4’)

I think the last error you’re seeing is from database/migrations/2016_04_18_174135_add_page_size.php

You’ll need to comment out that part and try again.

I commented my way through and its working! But i commented out stuff which had a reason it was there I guess, should I be worried about that?

Table/field changes are absolutely needed for the app to work correctly. The foreign keys are certainly good to have but the app should work without them.

okay thank you for your help, case closed :slight_smile: