@@ -153,7 +153,7 @@ type Table = '[] :=>
156− setup :: Definition '[] '["tab" ::: 'Table Table]
156+ setup :: Definition '["public" ::: '[]] '["public" ::: '["tab" ::: 'Table Table]]
157 setup = createTable #tab
157 setup = createTable #tab
158 (nullable int `as` #a :* nullable real `as` #b) Nil
158 (nullable int `as` #a :* nullable real `as` #b) Nil
159in printSQL setup
159in printSQL setup
@@ -189,11 +189,11 @@ type Table = '[] :=>
189 , "b" ::: 'NoDef :=> 'Null 'PGfloat4 ]
189 , "b" ::: 'NoDef :=> 'Null 'PGfloat4 ]
192−>>> type Schema = '["tab" ::: 'Table Table]
192+>>> type DB = '["public" ::: '["tab" ::: 'Table Table]]
196− setup :: Definition Schema Schema
196+ setup :: Definition DB DB
197 setup = createTableIfNotExists #tab
197 setup = createTableIfNotExists #tab
198 (nullable int `as` #a :* nullable real `as` #b) Nil
198 (nullable int `as` #a :* nullable real `as` #b) Nil
199in printSQL setup
199in printSQL setup
@@ -280,7 +280,7 @@ type Schema = '[
283− definition :: Definition '[] Schema
283+ definition :: Definition '["public" ::: '[]] '["public" ::: Schema]
284 definition = createTable #tab
284 definition = createTable #tab
285 ( (int & notNullable) `as` #a :*
285 ( (int & notNullable) `as` #a :*
286 (int & notNullable) `as` #b )
286 (int & notNullable) `as` #b )
@@ -315,7 +315,7 @@ type Schema = '[
318− definition :: Definition '[] Schema
318+ definition :: Definition '["public" ::: '[]] '["public" ::: Schema]
319 definition = createTable #tab
319 definition = createTable #tab
320 ( (int & nullable) `as` #a :*
320 ( (int & nullable) `as` #a :*
321 (int & nullable) `as` #b )
321 (int & nullable) `as` #b )
@@ -345,11 +345,12 @@ type Schema = '[
345 "id" ::: 'Def :=> 'NotNull 'PGint4,
345 "id" ::: 'Def :=> 'NotNull 'PGint4,
346 "name" ::: 'NoDef :=> 'NotNull 'PGtext
346 "name" ::: 'NoDef :=> 'NotNull 'PGtext
348+type DB = '["public" ::: Schema]
352− definition :: Definition '[] Schema
353+ definition :: Definition '["public" ::: '[]] DB
353 definition = createTable #tab
354 definition = createTable #tab
354 ( serial `as` #id :*
355 ( serial `as` #id :*
355 (text & notNullable) `as` #name )
356 (text & notNullable) `as` #name )
@@ -395,7 +396,7 @@ type Schema =
398− setup :: Definition '[] Schema
399+ setup :: Definition '["public" ::: '[]] '["public" ::: Schema]
400 createTable #users
401 createTable #users
401 ( serial `as` #id :*
402 ( serial `as` #id :*
@@ -430,7 +431,7 @@ type Schema =
433− setup :: Definition '[] Schema
434+ setup :: Definition '["public" ::: '[]] '["public" ::: Schema]
435 createTable #employees
436 createTable #employees
436 ( serial `as` #id :*
437 ( serial `as` #id :*
@@ -533,7 +534,7 @@ DROP statements
536−-- definition :: Definition '["muh_table" ::: 'Table t] '[]
537+-- definition :: Definition '["public" ::: '["muh_table" ::: 'Table t]] '["public" ::: '[]]
537-- definition = dropTable #muh_table
538-- definition = dropTable #muh_table
@@ -591,7 +592,7 @@ newtype AlterTable
592-- definition :: Definition
593-- definition :: Definition
593-- '["public" ::: '["tab" ::: 'Table ('[] :=> '["col" ::: 'NoDef :=> 'NotNull 'PGint4])]]
594-- '["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])]]
595-- definition = alterTable #tab (addConstraint #positive (check #col (#col .> 0)))
596-- definition = alterTable #tab (addConstraint #positive (check #col (#col .> 0)))
596-- in printSQL definition
597-- in printSQL definition