on dev help sign in
small test fixes
commitdfd688515a895eb8129b19374ce79f485b266da9 authorEitan Chatav <eitan.chatav@gmail.com> dateWed 23 Aug 2017, 10:34 (9 years ago) parentef66497
1 file changed+5−5
squeal-postgresql/src/Squeal/PostgreSQL/Definition.hs+5−5
squeal-postgresql/src/Squeal/PostgreSQL/Definition.hs+5−5
@@ -333,12 +333,12 @@ alterTableRename table0 table1 = UnsafeDefinition $
333333-- >>> :{
334334-- let
335335-- definition :: Definition
336−-- '["tab" ::: '["col" ::: 'Required ('Null 'PGint4)]]
337−-- '["tab" ::: '["col" ::: 'Required ('Null 'PGint4)]]
336+-- '["tab" ::: '["col" ::: 'Required ('NotNull 'PGint4)]]
337+-- '["tab" ::: '["col" ::: 'Required ('NotNull 'PGint4)]]
338338-- definition = alterTableAddConstraint #tab (check (#col .> 0))
339339-- in renderDefinition definition
340340-- :}
341−-- "ALTER TABLE tab ADD check ((col > 0));"
341+-- "ALTER TABLE tab ADD CHECK ((col > 0));"
342342alterTableAddConstraint
343343 :: HasTable table schema columns
344344 => Alias table
@@ -556,6 +556,6 @@ dropNotNull = UnsafeAlterColumn $ "DROP NOT NULL"
556556-- alterTable #tab (alterColumn #col (alterType (numeric & notNull)))
557557-- in renderDefinition definition
558558-- :}
559−-- "ALTER TABLE tab ALTER COLUMN col TYPE numeric;"
559+-- "ALTER TABLE tab ALTER COLUMN col TYPE numeric NOT NULL;"
560560alterType :: TypeExpression ty -> AlterColumn ty0 ty1
561−alterType ty = UnsafeAlterColumn $ "TYPE " <> renderTypeExpression ty
561+alterType ty = UnsafeAlterColumn $ "TYPE" <+> renderTypeExpression ty