How to run mix phx.gen.schema command for a preprod or prod environment

How to run mix phx.gen.schema and mix ecto.migrate commands for a pre-prod or prod environment?

I am able to run the phx.gen.schema and mix ecto.migrate commands to create a table in my local database.
Now I want to create the same table in pre-prod and production environment using these mix commands. How to achieve that. Can someone please guide me.

Can anyone help me out here?

You can run Ecto migrations in production, following this tutorial:
https://elixirschool.com/blog/til-how-to-run-ecto-migrations-in-production/

Task phx.gen.schema is only used when developing to generate codes, you don’t have to run it in production.

Thanks I will check it.