diff --git a/src/Model/Migration.hs b/src/Model/Migration.hs index 0d857c129..6e01416ba 100644 --- a/src/Model/Migration.hs +++ b/src/Model/Migration.hs @@ -88,7 +88,7 @@ customMigrations :: MonadIO m => Map (Key AppliedMigration) (ReaderT SqlBackend customMigrations = Map.fromListWith (>>) [ ( AppliedMigrationKey [migrationVersion|initial|] [version|0.0.0|] , whenM (tableExists "user") $ do -- New theme format - userThemes <- [sqlQQ| SELECT 'id', 'theme' FROM 'user'; |] + userThemes <- [sqlQQ| SELECT "id", "theme" FROM "user"; |] forM_ userThemes $ \(uid, Single str) -> case stripPrefix "theme--" str of Just v | Just theme <- fromPathPiece v -> update uid [UserTheme =. theme] @@ -97,8 +97,8 @@ customMigrations = Map.fromListWith (>>) , ( AppliedMigrationKey [migrationVersion|0.0.0|] [version|1.0.0|] , whenM (tableExists "sheet") $ -- Better JSON encoding [executeQQ| - ALTER TABLE 'sheet' ALTER COLUMN 'type' TYPE json USING 'type'::json; - ALTER TABLE 'sheet' ALTER COLUMN 'grouping' TYPE json USING 'grouping'::json; + ALTER TABLE "sheet" ALTER COLUMN "type" TYPE json USING "type"::json; + ALTER TABLE "sheet" ALTER COLUMN "grouping" TYPE json USING "grouping"::json; |] ) , ( AppliedMigrationKey [migrationVersion|1.0.0|] [version|2.0.0|]