@@ -85,7 +85,7 @@ CREATE statements
8585
8686-- | `createTable` adds a table to the schema.
8787--
88−-- >>> :set -XOverloadedLabels -XDataKinds
88+-- >>> :set -XOverloadedLabels
8989-- >>> :{
9090-- renderDefinition $
9191-- createTable #tab (int `As` #a :* real `As` #b :* Nil) []
@@ -136,7 +136,6 @@ newtype TableConstraint
136136-- It allows you to specify that the value in a certain column must satisfy
137137-- a Boolean (truth-value) expression.
138138--
139−-- >>> :set -XOverloadedLabels -XDataKinds
140139-- >>> :{
141140-- renderDefinition $
142141-- createTable #tab
@@ -154,7 +153,6 @@ check condition = UnsafeTableConstraint $
154153-- | `unique` constraints ensure that the data contained in a column,
155154-- or a group of columns, is unique among all the rows in the table.
156155--
157−-- >>> :set -XOverloadedLabels -XDataKinds
158156-- >>> :{
159157-- renderDefinition $
160158-- createTable #tab
@@ -174,7 +172,6 @@ unique columns = UnsafeTableConstraint $
174172-- can be used as a unique identifier for rows in the table.
175173-- This requires that the values be both unique and not null.
176174--
177−-- >>> :set -XOverloadedLabels -XDataKinds
178175-- >>> :{
179176-- renderDefinition $
180177-- createTable #tab
@@ -195,7 +192,6 @@ primaryKey columns = UnsafeTableConstraint $
195192-- another table. We say this maintains the referential integrity
196193-- between two related tables.
197194--
198−-- >>> :set -XOverloadedLabels -XDataKinds
199195-- >>> :{
200196-- let
201197-- definition :: Definition '[]
@@ -285,6 +281,10 @@ renderOnUpdate = \case
285281DROP statements
286282-----------------------------------------}
287283
284+-- | `dropTable` removes a table from the schema.
285+--
286+-- >>> renderDefinition $ dropTable #muh_table
287+-- "DROP TABLE muh_table;"
288288dropTable
289289 :: KnownSymbol table
290290 => Alias table
@@ -295,6 +295,7 @@ dropTable table = UnsafeDefinition $ "DROP TABLE" <+> renderAlias table <> ";"
295295ALTER statements
296296-----------------------------------------}
297297
298+-- | `alterTable` changes the definition of a table from the schema.
298299alterTable
299300 :: HasTable table schema columns0
300301 => Alias table
@@ -306,6 +307,10 @@ alterTable table alteration = UnsafeDefinition $
306307 <+> renderAlterTable alteration
307308 <> ";"
308309
310+-- | `alterTable` changes the name of a table from the schema.
311+--
312+-- >>> renderDefinition $ alterTableRename #foo #bar
313+-- "ALTER TABLE foo RENAME TO bar;"
309314alterTableRename
310315 :: (KnownSymbol table0, KnownSymbol table1)
311316 => Alias table0