Migration error from 18 to 19

This happens when vikunja starts up. I used the .deb. The frontend seems to have installed okay as I was able to login with that before updating the backend. This is on debian with mariadb backend. I used the same config.yml as prior.

But I got database problemos.

2022-08-04T00:58:45.481138054Z: INFO    ▶ [DATABASE] 04a Add blurHash to list backgrounds.
2022-08-04T00:58:45.48172218Z: INFO     ▶ [DATABASE] 04b [SQL] SELECT `TABLE_NAME`, `ENGINE`, `AUTO_INCREMENT`, `TABLE_COMMENT` from `INFORMATION_SCHEMA`.`TABLES` WHERE `TABLE_SCHEMA`=? AND (`ENGINE`='MyISAM' OR `ENGINE` = 'InnoDB' OR `ENGINE` = 'TokuDB') [vikunja] - 562.528µs
2022-08-04T00:58:45.482776457Z: INFO    ▶ [DATABASE] 04c [SQL] SELECT `COLUMN_NAME`, `IS_NULLABLE`, `COLUMN_DEFAULT`, `COLUMN_TYPE`, `COLUMN_KEY`, `EXTRA`, `COLUMN_COMMENT`, (INSTR(VERSION(), 'maria') > 0 && (SUBSTRING_INDEX(VERSION(), '.', 1) > 10 || (SUBSTRING_INDEX(VERSION(), '.', 1) = 10 && (SUBSTRING_INDEX(SUBSTRING(VERSION(), 4), '.', 1) > 2 || (SUBSTRING_INDEX(SUBSTRING(VERSION(), 4), '.', 1) = 2 && SUBSTRING_INDEX(SUBSTRING(VERSION(), 6), '-', 1) >= 7))))) AS NEEDS_QUOTE FROM `INFORMATION_SCHEMA`.`COLUMNS` WHERE `TABLE_SCHEMA` = ? AND `TABLE_NAME` = ? ORDER BY `COLUMNS`.ORDINAL_POSITION [vikunja lists] - 858.517µs
2022-08-04T00:58:45.483240814Z: INFO    ▶ [DATABASE] 04d [SQL] SELECT `INDEX_NAME`, `NON_UNIQUE`, `COLUMN_NAME` FROM `INFORMATION_SCHEMA`.`STATISTICS` WHERE `TABLE_SCHEMA` = ? AND `TABLE_NAME` = ? [vikunja lists] - 266.612µs
2022-08-04T00:58:45.483341691Z: WARNING ▶ [DATABASE] 04e Table lists has column title but struct has not related field
2022-08-04T00:58:45.483356378Z: WARNING ▶ [DATABASE] 04f Table lists has column description but struct has not related field
2022-08-04T00:58:45.483478624Z: WARNING ▶ [DATABASE] 050 Table lists has column identifier but struct has not related field
2022-08-04T00:58:45.483493885Z: WARNING ▶ [DATABASE] 051 Table lists has column hex_color but struct has not related field
2022-08-04T00:58:45.483548187Z: WARNING ▶ [DATABASE] 052 Table lists has column owner_id but struct has not related field
2022-08-04T00:58:45.483604177Z: WARNING ▶ [DATABASE] 053 Table lists has column namespace_id but struct has not related field
2022-08-04T00:58:45.483664615Z: WARNING ▶ [DATABASE] 054 Table lists has column is_archived but struct has not related field
2022-08-04T00:58:45.483765662Z: WARNING ▶ [DATABASE] 055 Table lists has column position but struct has not related field
2022-08-04T00:58:45.483780288Z: WARNING ▶ [DATABASE] 056 Table lists has column created but struct has not related field
2022-08-04T00:58:45.483838833Z: WARNING ▶ [DATABASE] 057 Table lists has column updated but struct has not related field
2022-08-04T00:58:45.484234147Z: INFO    ▶ [DATABASE] 058 [SQL] SELECT `id`, `background_file_id`, `background_blur_hash` FROM `lists` WHERE (background_file_id is not null AND background_file_id != ?) [0] - 253.892µs
2022-08-04T00:58:45.484340295Z: INFO    ▶ migration/func1 059 Creating BlurHash for 2 list backgrounds, this might take a while...
2022-08-04T00:58:45.484453705Z: CRITICAL        ▶ migration/Migrate 05a Migration failed: migration 20211212210054 failed: open ./files/11: no such file or directory

Can you try to just create the file? (With touch)

I can try that.

What root path should I be starting from?

./files/11

Like what’s the base path to this before the files folder? just like /opt/vikunja/files/11 or where ever the binary is?

If you didn’t configure the service.rootpath or files.basepath it’s next to the binary.

Thank you! This worked.

I did have one more error where it said that the migration couldn’t understand the image format for background_file_id in the lists table.

So I just marked the 2 fields that had references to files to 0, saved that and moved on and migration completed.

Probably cause I started the backend from a weird location due to the other issue or something. There’s a few links around the system to the vikunja bin. But whatever, it worked and whomever can just go add images to their list again. lol.

But it worked!

I could have gone to look at the vikunja.service to see where it was used to running it from I guess but I didn’t think of that until an hour later.

1 Like