WaspW
Wasp16mo ago
Conspyre

After deploying on Railway, database schema changes are not propagated

Wondering why my app isn't working, I check in the server logs to find there area lot of errors related to an undefined database field. This is because we added a database field after deploying to Railway.

Now we have steps for deploying the client, and deploying the server that both involve using the Railway CLI ("railway up"), however this step does not seem to address migrations.

I've tried changing the DATABASE_URL in my local .env.server to the URL provided by Railway and running "wasp db migrate-dev". This fails with:

❌ --- [Error] Can not connect to database: ---------------------------------------

The database needs to be running in order to execute this command. You can easily start a managed dev database with wasp start db.

How to deploy migrations to Railway?
Was this page helpful?