Migration fix attempt

This commit is contained in:
SJost 2018-09-06 14:13:42 +02:00
parent a29255f87c
commit e971432cd7

View File

@ -114,7 +114,7 @@ customMigrations = Map.fromListWith (>>)
|]
forM_ schoolTable $ \(Single idnr, Single ssh) ->
[executeQQ|
UPDATE "user_admin" SET "school" = #{ssh} WHERE school = #{tshow idnr};
UPDATE "user_admin" SET school = #{ssh} WHERE school = #{tshow idnr};
|]
[executeQQ|
ALTER TABLE "user_admin" ADD CONSTRAINT "user_admin_school_fkey"
@ -127,7 +127,7 @@ customMigrations = Map.fromListWith (>>)
|]
forM_ schoolTable $ \(Single idnr, Single ssh) ->
[executeQQ|
UPDATE "user_lecturer" SET "school" = #{ssh} WHERE school = #{tshow idnr};
UPDATE "user_lecturer" SET school = #{ssh} WHERE school = #{tshow idnr};
|]
[executeQQ|
ALTER TABLE "user_lecturer" ADD CONSTRAINT "user_lecturer_school_fkey"
@ -140,7 +140,7 @@ customMigrations = Map.fromListWith (>>)
|]
forM_ schoolTable $ \(Single idnr, Single ssh) ->
[executeQQ|
UPDATE "course" SET "school" = #{ssh} WHERE school = #{tshow idnr};
UPDATE "course" SET school = #{ssh} WHERE school = #{tshow idnr};
|]
[executeQQ|
ALTER TABLE "course" ADD CONSTRAINT "course_school_fkey"