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
Percy11mo ago
Project ID: 98888b3e-8302-4a34-a31a-6ba9963dccee
CodeLover
CodeLoverOP11mo ago
Project id : 98888b3e-8302-4a34-a31a-6ba9963dccee
Brody
Brody11mo ago
hey is the migration still stuck?
CodeLover
CodeLoverOP11mo 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
Brody11mo ago
can you check the logs of the migration service for any errors?
CodeLover
CodeLoverOP11mo 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
Brody11mo ago
set that variable
CodeLover
CodeLoverOP11mo ago
To True?
Brody
Brody11mo ago
any value should work
CodeLover
CodeLoverOP11mo ago
OK. Thanks, man. I'll try it now. I've tried it, but it didn't work
Brody
Brody11mo ago
what do the logs say now
CodeLover
CodeLoverOP11mo 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
Brody11mo ago
have you set that variable?
CodeLover
CodeLoverOP11mo ago
Yes, I've set the OVERWRITE_DATABASE to True
Brody
Brody11mo ago
the migration service thinks otherwise can you send me a screenshot of the project so i know where we are at?
CodeLover
CodeLoverOP11mo ago
Yes, sure
CodeLover
CodeLoverOP11mo ago
Here
No description
Brody
Brody11mo ago
thats a lot of red
CodeLover
CodeLoverOP11mo ago
Yes, I tried three times and it failed tree times
Brody
Brody11mo ago
delete everything highlighted
No description
Brody
Brody11mo ago
and delete any stray volumes as a result
CodeLover
CodeLoverOP11mo ago
OK. Got it OK. It's done
Brody
Brody11mo ago
new screenshot please
CodeLover
CodeLoverOP11mo ago
Here it is
No description
Brody
Brody11mo ago
rename your mysql database to just MySQL
CodeLover
CodeLoverOP11mo ago
OK. I dit it
Brody
Brody11mo ago
would you happen to know how much data you have in your mysql database? would it be over 5gb?
CodeLover
CodeLoverOP11mo ago
No, I don't. But I am quite sure it is less than 1 gb
Brody
Brody11mo ago
sounds good does that school-manager service use variable references?
CodeLover
CodeLoverOP11mo ago
No, I hard-coded the url
Brody
Brody11mo ago
please use reference variables before we run another migration https://docs.railway.app/guides/variables#referencing-another-services-variable
CodeLover
CodeLoverOP11mo ago
OK.
Brody
Brody11mo ago
let me know when done!
CodeLover
CodeLoverOP11mo ago
It's done now
Brody
Brody11mo ago
can you show me how you have used reference variables?
CodeLover
CodeLoverOP11mo ago
here
No description
Brody
Brody11mo ago
cool, re-run the migration now
CodeLover
CodeLoverOP11mo ago
OK It worked!! Thank you very much @Brody
Brody
Brody11mo ago
no problem!
CodeLover
CodeLoverOP11mo ago
By the way, is it possible to check the current db size?
Brody
Brody11mo ago
CodeLover
CodeLoverOP11mo ago
OK. A 1000 thanks
Brody
Brody11mo ago
happy to help!
Want results from more Discord servers?
Add your server