Clarification of backendMigrationScript
's rendering function
#730
Replies: 1 comment
-
Hi Peter, The key to understanding
This means that you're looking for a rendered function of the type ( Drilling deeper, you'll see that any Turns out there is something very close called |
Beta Was this translation helpful? Give feedback.
-
Question about
backendMigrationScript
: https://hackage.haskell.org/package/beam-migrate-0.5.3.1/docs/Database-Beam-Migrate-Simple.html#v:backendMigrationScriptWould you provide an example of the
function to convert a command to a 'String'
, therender
argument?I have a test ready to go:
https://github.com/peterbecich/beam/blob/db771f0f58a99d96ac29210fb27da114b537a488/beam-postgres/examples/app/Main.hs#L16
Given:
https://github.com/peterbecich/beam/blob/db771f0f58a99d96ac29210fb27da114b537a488/beam-postgres/examples/src/Pagila/Schema.hs#L18-L20
and a modification to the
backendMigrationScript
function:https://github.com/peterbecich/beam/blob/db771f0f58a99d96ac29210fb27da114b537a488/beam-migrate/Database/Beam/Migrate/Simple.hs#L342-L350
, I am hoping it will print the SQL generated from these Beam migration
V0001
andV0002
.Thanks
Beta Was this translation helpful? Give feedback.
All reactions