Custom app best practice

Hello im looking for a best practice guide to creating a custom app. Whilst erpnext installation/customisation is documented there seems to be very little focus on why commands are run and what to do when they go wrong (this is mildly infuriating because things go wrong a lot with erpnext). So my current challenge below, and any assistance appreciated please…

ive created a new app appZ on serverA and saved it to github
ive backed up serverA and sent the backups to serverB
ive installed appZ on serverB
ive restored/renamed/migrated the database backup onto serverB
errors have been observed during these processes but have been overcome by restarting/reloding various services
serverB instance is connected to via a browser but gives an error after logging in - (1054, “Unknown column ‘category’ in ‘field list’”)

My challenge is what to do next - ideally i would like to health check my new app before attempting to migrate it - how is this done? documentation? suggestions?

How do i debug serverB instance?

…as always any assitance thoroughly appreciated, cheers!