@@ -14,8 +14,7 @@ import Type.Proxy (Proxy(..))
1414import Yoga.Om as Om
1515import Yoga.Postgres as PG
1616import Yoga.Postgres.ClientOm (run, runOne, runExec)
17−import Data.DateTime (DateTime)
18−import Yoga.Postgres.Schema (Table, PrimaryKey, AutoIncrement, Unique, Default, DefaultExpr, from, into, select, where_, orderBy, limit, groupBy, insert, delete, returning, union)
17+import Yoga.Postgres.Schema (Table, PrimaryKey, AutoIncrement, Unique, Default, DefaultExpr, TimestampTZ, from, into, select, where_, orderBy, limit, groupBy, insert, delete, returning, union)
1918
2019spec :: Spec Unit
2120spec = describe "Query builder" do
@@ -62,7 +61,7 @@ spec = describe "Query builder" do
6261 it "inserts a row with default created_at and updated_at" $ withUsersTable do
6362 row <- into usersTable # insert { name: "Alice", email: "a@t.com", role: "admin" } # returning @"created_at, updated_at" # runOne {}
6463 r <- shouldBeJust row
65− r.created_at `shouldEqual` (r.updated_at :: DateTime)
64+ r.created_at `shouldEqual` r.updated_at
6665
6766 it "deletes with a condition and returns the deleted rows" $ withUsersTable do
6867 _ <- into usersTable # insert { name: "Alice", email: "a@t.com", role: "admin" } # runExec {}
@@ -92,8 +91,8 @@ type UsersTable = Table "test_om_users"
9291 , email :: Unique String
9392 , active :: Default "true" Boolean
9493 , role :: String
95− , created_at :: DefaultExpr "now()" DateTime
96− , updated_at :: DefaultExpr "now()" DateTime
94+ , created_at :: DefaultExpr "now()" TimestampTZ
95+ , updated_at :: DefaultExpr "now()" TimestampTZ
9796 )
9897
9998usersTable :: Proxy UsersTable