@@ -31,7 +31,7 @@ type EmailsTable =
3131
3232>>> :{
3333let
34− makeUsers :: Migration IO '[] '["users" ::: UsersTable]
34+ makeUsers :: Migration IO '[] '["users" ::: 'Table UsersTable]
3535 makeUsers = Migration
3636 { name = "make users table"
3737 , up = void . define $
@@ -45,8 +45,8 @@ let
4545
4646>>> :{
4747let
48− makeEmails :: Migration IO '["users" ::: UsersTable]
49− '["users" ::: UsersTable, "emails" ::: EmailsTable]
48+ makeEmails :: Migration IO '["users" ::: 'Table UsersTable]
49+ '["users" ::: 'Table UsersTable, "emails" ::: 'Table EmailsTable]
5050 makeEmails = Migration
5151 { name = "make emails table"
5252 , up = void . define $
@@ -68,7 +68,7 @@ Now that we have a couple migrations we can chain them together.
6868>>> :{
6969let
7070 numMigrations
71− :: Has "schema_migrations" schema MigrationsTable
71+ :: Has "schema_migrations" (TablesOf schema) MigrationsTable
7272 => PQ schema schema IO ()
7373 numMigrations = do
7474 result <- runQuery (selectStar (from (table (#schema_migrations `As` #m))))
@@ -175,8 +175,8 @@ migrateUp migration =
175175 :: MonadBaseControl IO io
176176 => AlignedList (Migration io) schema0 schema1
177177 -> PQ
178− ("schema_migrations" ::: MigrationsTable ': schema0)
179− ("schema_migrations" ::: MigrationsTable ': schema1)
178+ ("schema_migrations" ::: 'Table MigrationsTable ': schema0)
179+ ("schema_migrations" ::: 'Table MigrationsTable ': schema1)
180180 io ()
181181 upMigrations = \case
182182 Done -> return ()
@@ -185,8 +185,8 @@ migrateUp migration =
185185 upMigration
186186 :: MonadBase IO io
187187 => Migration io schema0 schema1 -> PQ
188− ("schema_migrations" ::: MigrationsTable ': schema0)
189− ("schema_migrations" ::: MigrationsTable ': schema1)
188+ ("schema_migrations" ::: 'Table MigrationsTable ': schema0)
189+ ("schema_migrations" ::: 'Table MigrationsTable ': schema1)
190190 io ()
191191 upMigration step =
192192 queryExecuted step
@@ -202,8 +202,8 @@ migrateUp migration =
202202 queryExecuted
203203 :: MonadBase IO io
204204 => Migration io schema0 schema1 -> PQ
205− ("schema_migrations" ::: MigrationsTable ': schema0)
206− ("schema_migrations" ::: MigrationsTable ': schema0)
205+ ("schema_migrations" ::: 'Table MigrationsTable ': schema0)
206+ ("schema_migrations" ::: 'Table MigrationsTable ': schema0)
207207 io Row
208208 queryExecuted step = do
209209 result <- runQueryParams selectMigration (Only (name step))
@@ -230,8 +230,8 @@ migrateDown migrations =
230230 downMigrations
231231 :: MonadBaseControl IO io
232232 => AlignedList (Migration io) schema0 schema1 -> PQ
233− ("schema_migrations" ::: MigrationsTable ': schema1)
234− ("schema_migrations" ::: MigrationsTable ': schema0)
233+ ("schema_migrations" ::: 'Table MigrationsTable ': schema1)
234+ ("schema_migrations" ::: 'Table MigrationsTable ': schema0)
235235 io ()
236236 downMigrations = \case
237237 Done -> return ()
@@ -240,8 +240,8 @@ migrateDown migrations =
240240 downMigration
241241 :: MonadBase IO io
242242 => Migration io schema0 schema1 -> PQ
243− ("schema_migrations" ::: MigrationsTable ': schema1)
244− ("schema_migrations" ::: MigrationsTable ': schema0)
243+ ("schema_migrations" ::: 'Table MigrationsTable ': schema1)
244+ ("schema_migrations" ::: 'Table MigrationsTable ': schema0)
245245 io ()
246246 downMigration step =
247247 queryExecuted step
@@ -257,8 +257,8 @@ migrateDown migrations =
257257 queryExecuted
258258 :: MonadBase IO io
259259 => Migration io schema0 schema1 -> PQ
260− ("schema_migrations" ::: MigrationsTable ': schema1)
261− ("schema_migrations" ::: MigrationsTable ': schema1)
260+ ("schema_migrations" ::: 'Table MigrationsTable ': schema1)
261+ ("schema_migrations" ::: 'Table MigrationsTable ': schema1)
262262 io Row
263263 queryExecuted step = do
264264 result <- runQueryParams selectMigration (Only (name step))
@@ -309,7 +309,7 @@ deleteMigration = deleteFrom_ #schema_migrations (#name .== param @1)
309309-- | Selects a `Migration` from the `MigrationsTable`, returning
310310-- the time at which it was executed.
311311selectMigration
312− :: Has "schema_migrations" schema MigrationsTable
312+ :: Has "schema_migrations" (TablesOf schema) MigrationsTable
313313 => Query schema '[ 'NotNull 'PGtext ]
314314 '[ "executed_at" ::: 'NotNull 'PGtimestamptz ]
315315selectMigration = select