@@ -93,7 +93,9 @@ createSchema sessionId conn = do
9393 toAddTypeExpr (Proxy :: Proxy Category),
9494 toDefineExpr (Proxy :: Proxy Blog) "blog",
9595 toDefineExpr (Proxy :: Proxy Comment) "comment",
96− databaseContextExprForForeignKey "blog_comment" ("comment", ["blogTitle"]) ("blog", ["title"]) ]
96+ databaseContextExprForForeignKey "blog_comment" ("comment", ["blogTitle"]) ("blog", ["title"]),
97+ databaseContextExprForUniqueKey "blog" ["title"]
98+ ]
9799 pure ()
98100
99101--create some sample values and insert them into the database's relation variables