@@ -132,15 +132,20 @@ spec = do
132 "SELECT orders1.*\
132 "SELECT orders1.*\
133 \ FROM orders AS orders1\
133 \ FROM orders AS orders1\
134 \ CROSS JOIN orders AS orders2;"
134 \ CROSS JOIN orders AS orders2;"
135− it "should render simple CREATE TABLE statements" $ do
135+ it "should render CREATE TABLE statements" $ do
137− statement :: Statement '[] '[] '[] Tables
138− statement = createTable #table1
136+ createTable #table1
139− ( (int4 & notNull) `As` #col1
137+ ( (int4 & notNull) `As` #col1
140− :& (int4 & notNull) `As` #col2
138+ :& (int4 & notNull) `As` #col2
141− :& RNil)
139+ :& RNil)
142− statement `shouldRenderAs`
140+ `shouldRenderAs`
143 "CREATE TABLE table1 (col1 int4 NOT NULL, col2 int4 NOT NULL);"
141 "CREATE TABLE table1 (col1 int4 NOT NULL, col2 int4 NOT NULL);"
145+ :& (int8 & notNull & default_ 8) `As` #col3
148+ "CREATE TABLE table2 (col1 serial, col2 text, col3 int8 NOT NULL DEFAULT 8);"
144 it "should render DROP TABLE statements" $ do
149 it "should render DROP TABLE statements" $ do
146 statement :: Statement '[] '[] Tables '[]
151 statement :: Statement '[] '[] Tables '[]