I think that this is a bad advice, because the database migrations must be done on runtime. If you use the build time for this:
1 - The database must be public available to the agent of the CI/CD
or 2 - If not public, must be done with a VPN
or 3 - The CI/CD agent must be deployed where can access to the database
or 4 - I think that the build process of an app can't modify in any aspect the deployed environment.
https://github.com/prisma/docs/blob/334d8e61c7073b986d7a7886d274b6887f1b8ad5/content/300-guides/200-deployment/550-deploy-database-changes-with-prisma-migrate.mdx#L9
I think that this is a bad advice, because the database migrations must be done on runtime. If you use the build time for this: 1 - The database must be public available to the agent of the CI/CD or 2 - If not public, must be done with a VPN or 3 - The CI/CD agent must be deployed where can access to the database or 4 - I think that the build process of an app can't modify in any aspect the deployed environment.