@@ -37,6 +37,11 @@ module Squeal.PostgreSQL.Definition
37 , createSchemaIfNotExists
37 , createSchemaIfNotExists
38 , createTable
38 , createTable
39 , createTableIfNotExists
39 , createTableIfNotExists
43+ , createTypeComposite
44+ , createTypeCompositeFrom
40 , TableConstraintExpression (..)
45 , TableConstraintExpression (..)
@@ -46,7 +51,10 @@ module Squeal.PostgreSQL.Definition
46 , OnDeleteClause (..)
51 , OnDeleteClause (..)
47 , OnUpdateClause (..)
52 , OnUpdateClause (..)
48 -- ** Drop
53 -- ** Drop
49 , dropTable
55 , dropTable
50 -- ** Alter
58 -- ** Alter
51 , alterTable
59 , alterTable
52 , alterTableRename
60 , alterTableRename
@@ -63,15 +71,6 @@ module Squeal.PostgreSQL.Definition
63 , setNotNull
71 , setNotNull
64 , dropNotNull
72 , dropNotNull
65 , alterType
73 , alterType
72− , createTypeComposite
73− , createTypeCompositeFrom
75 -- * Columns
74 -- * Columns
76 , ColumnTypeExpression (..)
75 , ColumnTypeExpression (..)
77 , nullable
76 , nullable
@@ -530,6 +529,20 @@ instance RenderSQL OnUpdateClause where
530DROP statements
529DROP statements
531-----------------------------------------}
530-----------------------------------------}
534+-- definition :: Definition '["muh_schema" ::: schema, "public" ::: public] '["public" ::: public]
535+-- definition = dropSchema #muh_schema
538+-- >>> printSQL definition
539+-- DROP SCHEMA "muh_schema";
541+ :: Has sch schemas schema
543+ -> Definition schemas (Drop sch schemas)
544+dropSchema sch = UnsafeDefinition $ "DROP SCHEMA" <+> renderSQL sch <> ";"
533-- | `dropTable` removes a table from the schema.
546-- | `dropTable` removes a table from the schema.