WatWowMap / DataParser

Raw data parser alternative to RealDeviceMap /raw endpoint
8 stars 8 forks source link

Migration error #32

Open bschultz opened 4 years ago

bschultz commented 4 years ago

Getting this for latest migration:

[DBController] Current: 3, Latest: 4
[DBController] MIGRATION IS ABOUT TO START IN 30 SECONDS, PLEASE MAKE SURE YOU HAVE A BACKUP!!!
[DBController] Migrating database to version 4
[DBController] Migration failed: Error: ER_CANT_CREATE_TABLE: Can't create table `rdm_dataparser`.`assignment` (errno: 150 "Foreign key constraint is incorrectly formed")
[DBController] Migration successful
[DBController] Migration done

And migration isn't running when doing pm2 restart DataParser. I have to stop and start manually but I don't know if this could be fixed somehow.

bschultz commented 4 years ago

Ok this had to do something with mixed collations 🙄

But maybe we can check the migration on restart stuff....

versx commented 4 years ago

Getting this for latest migration:

[DBController] Current: 3, Latest: 4
[DBController] MIGRATION IS ABOUT TO START IN 30 SECONDS, PLEASE MAKE SURE YOU HAVE A BACKUP!!!
[DBController] Migrating database to version 4
[DBController] Migration failed: Error: ER_CANT_CREATE_TABLE: Can't create table `rdm_dataparser`.`assignment` (errno: 150 "Foreign key constraint is incorrectly formed")
[DBController] Migration successful
[DBController] Migration done

And migration isn't running when doing pm2 restart DataParser. I have to stop and start manually but I don't know if this could be fixed somehow.

Interesting I wonder why it doesn't do the migration on restart 🤔 I wonder if it has to do with the clustering, since there's a master (which does the migration), maybe only the child cluster nodes are actually restarted with pm2 restart