root problem is a slow migration

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

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

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

which would cause crashes

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

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

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