R
Railway10mo ago
Thomas

Starting the migration over

If I migrated a database and then continued to write data to the legacy datebase, to re-migrate can I: - Delete the newly created migrated Databases (the ones with volumes)? - Delete the newly created volume - rename the legacy DB - and remigrate with the migrate button again? Or are their additional steps required?
11 Replies
Percy
Percy10mo ago
Project ID: N/A
Thomas
ThomasOP10mo ago
N/A
Brody
Brody10mo ago
missed one critical step - Delete the newly created migrated Databases (the ones with volumes)? - Delete the newly created volume - rename the legacy DB - make sure the app is using reference variables - and remigrate with the migrate button again?
Thomas
ThomasOP10mo ago
Ahh, yes, that would be important. That would prevent the same situation from happening again, right?
Brody
Brody10mo ago
correct!
Thomas
ThomasOP10mo ago
Is there a fast way to update my app to reference variables?
Brody
Brody10mo ago
edit the raw variables directly would be my preferred method do you know the syntax for them?
Thomas
ThomasOP10mo ago
I am not sure, this is less clear than I hoped: https://docs.railway.app/guides/variables#shared-variables
PGDATABASE=${{Postgres.PGDATABASE}}
PGHOST=${{Postgres.PGHOST}}
PGPASSWORD=${{Postgres.PGPASSWORD}}
PGPORT=${{Postgres.PGPORT}}
PGUSER=${{Postgres.PGUSER}}
PGDATABASE=${{Postgres.PGDATABASE}}
PGHOST=${{Postgres.PGHOST}}
PGPASSWORD=${{Postgres.PGPASSWORD}}
PGPORT=${{Postgres.PGPORT}}
PGUSER=${{Postgres.PGUSER}}
is this how I do it if my db is named postgres
Brody
Brody10mo ago
this is the section of the docs you'd need https://docs.railway.app/guides/variables#referencing-another-services-variable but yes those variables are all correct for use in step 4
Thomas
ThomasOP10mo ago
Thanks Brody
Brody
Brody10mo ago
no problem!
Want results from more Discord servers?
Add your server