Database Error after Container Update

I tried to update my open balena container. After the upgrade to that version:


i get this error:

db_1_4311d5a08a74 | 2019-09-11 12:21:38.455 UTC [31] ERROR:      column device.device type does not exist at character 172
    db_1_4311d5a08a74 | 2019-09-11 12:21:38.455 UTC [31] HINT:  Perhaps you meant to reference the column "device.device name" or the column " type".
    db_1_4311d5a08a74 | 2019-09-11 12:21:38.455 UTC [31] STATEMENT:  SELECT "device"."id"
    db_1_4311d5a08a74 | 	FROM (
    db_1_4311d5a08a74 | 		SELECT "device"."created at", "device"."id", "device"."actor", "device"."uuid", "device"."local id", "device"."device name", "device"."note", "device"."device type", "device"."is of-device type table", "device"."belongs to-application", "device"."is online", "device"."last connectivity event", "device"."is connected to vpn", "device"."last vpn event", "device"."is locked until-date", "device"."logs channel", "device"."public address", "device"."vpn address", "device"."ip address", "device"."is on-commit", "device"."download progress", "device"."status", "device"."os version", "device"."os variant", "device"."supervisor version", "device"."provisioning progress", "device"."provisioning state", "device"."api port", "device"."api secret", "device"."is managed by-service instance", "device"."should be running-release", "device"."is managed by-device"
    db_1_4311d5a08a74 | 		FROM "device"
    db_1_4311d5a08a74 | 		WHERE ("device"."actor" = $1
    db_1_4311d5a08a74 | 		OR EXISTS (
    db_1_4311d5a08a74 | 			SELECT 1
    db_1_4311d5a08a74 | 			FROM "application" AS "device.belongs to-application"
    db_1_4311d5a08a74 | 			WHERE "device"."belongs to-application" = "device.belongs to-application"."id"
    db_1_4311d5a08a74 | 			AND EXISTS (
    db_1_4311d5a08a74 | 				SELECT 1
    db_1_4311d5a08a74 | 				FROM "application" AS "device.belongs to-application.depends on-application"
    db_1_4311d5a08a74 | 				WHERE "device.belongs to-application"."depends on-application" = "device.belongs to-application.depends on-application"."id"
    db_1_4311d5a08a74 | 				AND EXISTS (
    db_1_4311d5a08a74 | 					SELECT 1
    db_1_4311d5a08a74 | 					FROM "device" AS "dev.belongs to-application.depends on-application.owns-device"
    db_1_4311d5a08a74 | 					WHERE "device.belongs to-application.depends on-application"."id" = "dev.belongs to-application.depends on-application.owns-device"."belongs to-application"
    db_1_4311d5a08a74 | 					AND "dev.belongs to-application.depends on-application.owns-device"."actor" = $1
    db_1_4311d5a08a74 | 				)
    db_1_4311d5a08a74 | 			)
    db_1_4311d5a08a74 | 		))
    db_1_4311d5a08a74 | 	) AS "device"
    db_1_4311d5a08a74 | 	WHERE "device"."uuid" = $2

Can somebody help?

You get this error because this migration hasn’t been run.
The migrations are run automatically but manually updating the versions as you did isn’t supported.
Versions will be bumped once we’ve tested them.

Ok. Thank you for the explanation. I have a backup so I think everything should be fine. Is there documentation of the preferred way to update open-balena?

I think git fetch, git pull origin master then ./scripts/compose up -d should work fine for updating open-balena.

Ok, i will make the next try with the bumped versions. Thank you for the help.