@@ -333,12 +333,12 @@ alterTableRename table0 table1 = UnsafeDefinition $
335-- definition :: Definition
335-- definition :: Definition
336−-- '["tab" ::: '["col" ::: 'Required ('Null 'PGint4)]]
336+-- '["tab" ::: '["col" ::: 'Required ('NotNull 'PGint4)]]
337−-- '["tab" ::: '["col" ::: 'Required ('Null 'PGint4)]]
337+-- '["tab" ::: '["col" ::: 'Required ('NotNull 'PGint4)]]
338-- definition = alterTableAddConstraint #tab (check (#col .> 0))
338-- definition = alterTableAddConstraint #tab (check (#col .> 0))
339-- in renderDefinition definition
339-- in renderDefinition definition
341−-- "ALTER TABLE tab ADD check ((col > 0));"
341+-- "ALTER TABLE tab ADD CHECK ((col > 0));"
342alterTableAddConstraint
342alterTableAddConstraint
343 :: HasTable table schema columns
343 :: HasTable table schema columns
344 => Alias table
344 => Alias table
@@ -556,6 +556,6 @@ dropNotNull = UnsafeAlterColumn $ "DROP NOT NULL"
556-- alterTable #tab (alterColumn #col (alterType (numeric & notNull)))
556-- alterTable #tab (alterColumn #col (alterType (numeric & notNull)))
557-- in renderDefinition definition
557-- in renderDefinition definition
559−-- "ALTER TABLE tab ALTER COLUMN col TYPE numeric;"
559+-- "ALTER TABLE tab ALTER COLUMN col TYPE numeric NOT NULL;"
560alterType :: TypeExpression ty -> AlterColumn ty0 ty1
560alterType :: TypeExpression ty -> AlterColumn ty0 ty1
561−alterType ty = UnsafeAlterColumn $ "TYPE " <> renderTypeExpression ty
561+alterType ty = UnsafeAlterColumn $ "TYPE" <+> renderTypeExpression ty