db debugging and tasks - mar 24 - apr

db debugging and tasks - mar 24 - apr – Kinopiodb debugging and tasks - mar 24 - apr – Kinopiodb debugging and tasks - mar 24 - apr – Kinopiodb debugging and tasks - mar 24 - apr – Kinopiodb debugging and tasks - mar 24 - apr – Kinopiodb debugging and tasks - mar 24 - apr – Kinopiodb debugging and tasks - mar 24 - apr – Kinopiodb debugging and tasks - mar 24 - apr – Kinopio

CleanShot-2024-03-24-at-20.59.37.mp4.zip lucas’ walkthrough of the problem

root problem is a slow migration

this allowed the server to start, and to properly enforce the connection type constraint

server crashed bc sync took very long, bc of foreign key constraints

the notification cardids foreignkey constraint was missing / not enforced

lucas wrote a script to look for connections with non-existent type. and then deleted those

there was also a similar error on the notifications table

which would cause crashes

so the belongsto relation between connection and connectionType wasn’t being enforced, so it was possible to assign a connection’s connectionType id to a type that didn’t exist in the db

models.sequelize.sync crashed server bc it didn’t have a catch

unique connectiontype id constraint wasn’t a problem bc it didn’t crash server