a year ago
I have a deployed application. I need to run database migrations in the application using CLI, but I can not see any cli and the railway cli is not connecting to my application, it only works locally.
3 Replies
a year ago
Railway does not offer this functionality.
The Railway CLI via railway run
and railway shell
are used to run commands locally only, but it will pull your linked service variable and run the command with them, Which is perfect for running database migrations.
See docs page for more info -
a year ago
So in this case, do
I have to manually create the tables on the MySQL service, or can I import sql.dumps? My app has a lot of tables.
a year ago
As mentioned previously, You can run whatever your migration command is locally through railway run
, give the docs page I linked a read please.