@@ -153,7 +153,7 @@ type Table = '[] :=>
153153
154154>>> :{
155155let
156− setup :: Definition '[] '["tab" ::: 'Table Table]
156+ setup :: Definition '["public" ::: '[]] '["public" ::: '["tab" ::: 'Table Table]]
157157 setup = createTable #tab
158158 (nullable int `as` #a :* nullable real `as` #b) Nil
159159in printSQL setup
@@ -189,11 +189,11 @@ type Table = '[] :=>
189189 , "b" ::: 'NoDef :=> 'Null 'PGfloat4 ]
190190:}
191191
192−>>> type Schema = '["tab" ::: 'Table Table]
192+>>> type DB = '["public" ::: '["tab" ::: 'Table Table]]
193193
194194>>> :{
195195let
196− setup :: Definition Schema Schema
196+ setup :: Definition DB DB
197197 setup = createTableIfNotExists #tab
198198 (nullable int `as` #a :* nullable real `as` #b) Nil
199199in printSQL setup
@@ -280,7 +280,7 @@ type Schema = '[
280280
281281>>> :{
282282let
283− definition :: Definition '[] Schema
283+ definition :: Definition '["public" ::: '[]] '["public" ::: Schema]
284284 definition = createTable #tab
285285 ( (int & notNullable) `as` #a :*
286286 (int & notNullable) `as` #b )
@@ -315,7 +315,7 @@ type Schema = '[
315315
316316>>> :{
317317let
318− definition :: Definition '[] Schema
318+ definition :: Definition '["public" ::: '[]] '["public" ::: Schema]
319319 definition = createTable #tab
320320 ( (int & nullable) `as` #a :*
321321 (int & nullable) `as` #b )
@@ -345,11 +345,12 @@ type Schema = '[
345345 "id" ::: 'Def :=> 'NotNull 'PGint4,
346346 "name" ::: 'NoDef :=> 'NotNull 'PGtext
347347 ])]
348+type DB = '["public" ::: Schema]
348349:}
349350
350351>>> :{
351352let
352− definition :: Definition '[] Schema
353+ definition :: Definition '["public" ::: '[]] DB
353354 definition = createTable #tab
354355 ( serial `as` #id :*
355356 (text & notNullable) `as` #name )
@@ -395,7 +396,7 @@ type Schema =
395396
396397>>> :{
397398let
398− setup :: Definition '[] Schema
399+ setup :: Definition '["public" ::: '[]] '["public" ::: Schema]
399400 setup =
400401 createTable #users
401402 ( serial `as` #id :*
@@ -430,7 +431,7 @@ type Schema =
430431
431432>>> :{
432433let
433− setup :: Definition '[] Schema
434+ setup :: Definition '["public" ::: '[]] '["public" ::: Schema]
434435 setup =
435436 createTable #employees
436437 ( serial `as` #id :*
@@ -533,7 +534,7 @@ DROP statements
533534--
534535-- >>> :{
535536-- let
536−-- definition :: Definition '["muh_table" ::: 'Table t] '[]
537+-- definition :: Definition '["public" ::: '["muh_table" ::: 'Table t]] '["public" ::: '[]]
537538-- definition = dropTable #muh_table
538539-- :}
539540--
@@ -591,7 +592,7 @@ newtype AlterTable
591592-- let
592593-- definition :: Definition
593594-- '["public" ::: '["tab" ::: 'Table ('[] :=> '["col" ::: 'NoDef :=> 'NotNull 'PGint4])]]
594−-- '["public" ::: '["tab" ::: 'Table ('["positive" ::: Check '["col"]] :=> '["col" ::: 'NoDef :=> 'NotNull 'PGint4])]]
595+-- '["public" ::: '["tab" ::: 'Table ('["positive" ::: 'Check '["col"]] :=> '["col" ::: 'NoDef :=> 'NotNull 'PGint4])]]
595596-- definition = alterTable #tab (addConstraint #positive (check #col (#col .> 0)))
596597-- in printSQL definition
597598-- :}