Database migration issue. The process stopped at Step 3 the Deploy Migration Service

I tried to migrate my railway database but it returned an error at step three without showing any log info
43 Replies
Percy
Percy10mo ago
Project ID: 98888b3e-8302-4a34-a31a-6ba9963dccee
CodeLover
CodeLover10mo ago
Project id : 98888b3e-8302-4a34-a31a-6ba9963dccee
Brody
Brody10mo ago
hey is the migration still stuck?
CodeLover
CodeLover10mo ago
It failed. I tried three times but it now fails At step 4: Migrate Data However, a New MySQL database was created, but I can't tell if it has all the data from the Legacy DB
Brody
Brody10mo ago
can you check the logs of the migration service for any errors?
CodeLover
CodeLover10mo ago
Yes. I've just checked and it shows an error: [ ERROR ] The new database is not empty. Aborting migration. auth_group_permissions Set the OVERWRITE_DATABASE environment variable to overwrite the new database.
Brody
Brody10mo ago
set that variable
CodeLover
CodeLover10mo ago
To True?
Brody
Brody10mo ago
any value should work
CodeLover
CodeLover10mo ago
OK. Thanks, man. I'll try it now. I've tried it, but it didn't work
Brody
Brody10mo ago
what do the logs say now
CodeLover
CodeLover10mo ago
[ ERROR ] The new database is not empty. Aborting migration. auth_permission django_admin_log django_celery_results_chordcounter Set the OVERWRITE_DATABASE environment variable to overwrite the new database.
Brody
Brody10mo ago
have you set that variable?
CodeLover
CodeLover10mo ago
Yes, I've set the OVERWRITE_DATABASE to True
Brody
Brody10mo ago
the migration service thinks otherwise can you send me a screenshot of the project so i know where we are at?
CodeLover
CodeLover10mo ago
Yes, sure
CodeLover
CodeLover10mo ago
Here
No description
Brody
Brody10mo ago
thats a lot of red
CodeLover
CodeLover10mo ago
Yes, I tried three times and it failed tree times
Brody
Brody10mo ago
delete everything highlighted
No description
Brody
Brody10mo ago
and delete any stray volumes as a result
CodeLover
CodeLover10mo ago
OK. Got it OK. It's done
Brody
Brody10mo ago
new screenshot please
CodeLover
CodeLover10mo ago
Here it is
No description
Brody
Brody10mo ago
rename your mysql database to just MySQL
CodeLover
CodeLover10mo ago
OK. I dit it
Brody
Brody10mo ago
would you happen to know how much data you have in your mysql database? would it be over 5gb?
CodeLover
CodeLover10mo ago
No, I don't. But I am quite sure it is less than 1 gb
Brody
Brody10mo ago
sounds good does that school-manager service use variable references?
CodeLover
CodeLover10mo ago
No, I hard-coded the url
Brody
Brody10mo ago
please use reference variables before we run another migration https://docs.railway.app/guides/variables#referencing-another-services-variable
CodeLover
CodeLover10mo ago
OK.
Brody
Brody10mo ago
let me know when done!
CodeLover
CodeLover10mo ago
It's done now
Brody
Brody10mo ago
can you show me how you have used reference variables?
CodeLover
CodeLover10mo ago
here
No description
Brody
Brody10mo ago
cool, re-run the migration now
CodeLover
CodeLover10mo ago
OK It worked!! Thank you very much @Brody
Brody
Brody10mo ago
no problem!
CodeLover
CodeLover10mo ago
By the way, is it possible to check the current db size?
Brody
Brody10mo ago
CodeLover
CodeLover10mo ago
OK. A 1000 thanks
Brody
Brody10mo ago
happy to help!
Want results from more Discord servers?
Add your server