PGSQL: Convert PassCollision in table prims to bool to avoid a hopeless cast that fails with newer versions of NPGSQL.

Signed-off-by: UbitUmarov <ajlduarte@sapo.pt>
This commit is contained in:
Geir Nøklebye
2017-05-13 17:43:59 +01:00
committed by UbitUmarov
parent 16f02cb6fd
commit 7cf82a71d6
2 changed files with 18 additions and 3 deletions

View File

@@ -1211,3 +1211,17 @@ BEGIN TRANSACTION;
ALTER TABLE prims ADD "PhysInertia" TEXT;
COMMIT;
:VERSION 47 #---- Convert field PassCollisions in table prims to BOOLEAN
BEGIN TRANSACTION;
ALTER TABLE "public"."prims" ALTER COLUMN "PassCollisions" DROP DEFAULT;
ALTER TABLE "public"."prims"
ALTER COLUMN "PassCollisions" TYPE BOOLEAN
USING CASE WHEN "PassCollisions" = 0 THEN FALSE
WHEN "PassCollisions" = 1 THEN TRUE
ELSE NULL
END;
COMMIT;