Errors due to bad migration: migrate: no such table: payments

I read yesterday that another user had not followed the migration instructions exactly (I did the same, not properly using the --delete flag and thus transferring over .shm files or something that were later imported into the database when i tried to run my node.

I then proceeded to do the database repair stuff, (which is a little unclear by the way, do we do the exact same process for all databases or is that just for bandwidth.db? The main DB I was having issue with was orders.db)

Anyways now I’m getting a crazy new error that I’m not familiar with.

2020-06-04T08:11:13.875Z INFO Telemetry enabled

2020-06-04T08:11:13.889Z INFO db.migration.37 Drop payments table as unused

Error: Error creating tables for master database on storagenode: migrate: no such table: payments

storj.io/storj/private/migrate.SQL.Run:252

storj.io/storj/private/migrate.(*Migration).Run.func1:171

storj.io/storj/private/dbutil/txutil.withTxOnce:75

storj.io/storj/private/dbutil/txutil.WithTx:36

storj.io/storj/private/migrate.(*Migration).Run:170

storj.io/storj/storagenode/storagenodedb.(*DB).MigrateToLatest:294

main.cmdRun:180

storj.io/private/process.cleanup.func1.4:359

storj.io/private/process.cleanup.func1:377

github.com/spf13/cobra.(*Command).execute:840

github.com/spf13/cobra.(*Command).ExecuteC:945

github.com/spf13/cobra.(*Command).Execute:885

storj.io/private/process.ExecWithCustomConfig:88

storj.io/private/process.ExecCustomDebug:70

main.main:320

runtime.main:203

Any help would be appreciated. Of course this is a very old large node, so hoping to try to save it.

That is comming from here: storj/storagenode/storagenodedb/database.go at 5a82c8d1b5958dc7b11bcdf38739ee9c3bceb167 · storj/storj · GitHub

What you want to do is find out which of the following migration steps have been exectued on your previous node. As soon as you know that you can decide if you want to recreate the old situation and run the migration or increase the version number in the table to skip the migration. In both cases you need to be careful ofc.