Postgres Db migration issues
I've been trying to migrate my db but it keeps stoping when it gets to the migrating step, i did not make any extra configuration and my project env is already lithered with so many migrations, how do i fix this please
65 Replies
Project ID:
4713c1f6-1710-4e59-bfc6-2aaa0aaea3e0
4713c1f6-1710-4e59-bfc6-2aaa0aaea3e0
lets get back to a clean slate, delete these services / volumes
hey @kane - did you ever get a successful migration?
Hello
No I didn’t
did you have time to try to work through this?
Yes please
I’m opening raway
can you send me a new screenshot of your project?
okay
i get this when i try to delete one of the migrations , its a production db and i cant risk to loose my data
slow down there, click here and then click discard changes
id like another screenshot of your project so i can be absolutely sure that my above screenshot is still correct
okay... i discarded as requested
okay you are not slowing down lol
now i'm confused on whihc is my real db, but my instinct says it's the one on the bottom right end
lol ... no changes made
you would unfortunately be wrong, the original database is on the left
what database variables are you using in code?
see the one i mentioned have the variable section and the legacy doesn't
yeah the legacy database is an entirely different old system, thats why you need to migrate away from it
think you could let me know this?
what info can i give you, or should i reveal the values to you? i dont get the request sorry
what environment variables are you using in code for your database? maybe
DATABASE_URL
?no i use the normal db configs to connect to the backend (PGPORT, PGUSER, PGHOST, PGDATA...)
thats connection to the backend service
if you clicked edit on one of those, would it contain a reference like
${{Postgres Legacy.PGHOST}}
specifically legacyokay let me check
this is my service revealed
if you clicked edit on one of those...
this was the one i thought it was , i was wrong perhaps 😦
this is the one you agreed is , i think it has the same settings
with my service
sorry, i should have been more clear, this question is asking about the database variables on your apps service
okay i'd send them
wow,
its the legacy
okay thats good
and to double check, we are looking at the raw editor for your
accountGig
service?yes sir
okay okay we doing good
you can safely delete everything shown in red
alright
doing that now
@Brody we've got this left
it's fine yea
you didnt delete the v2 postgres database?
i mean the dude on the bottom right has got no issues 😄
dude on the bottom right? im not sure i follow?
dude == postgres service?
sorry, bad humor, i meant this postgres service
but we dont want that dude
or that dude's volume
you confirmed that your service is not using it, it will only get in tha way
alright he's going then 🚮
Done. But we got this "mount" action up ther
^
oh thats the volume 🤔
yep
ok so i'm to mount?
click it i mean?
delete it
oh
done
rename that database to just
Postgres
okay
done
now run the migration again
okay
t'was successful, didn't get to this point initially
let me know if your app works as it should after it deploys
okay
it does thank you
so much
now you can go throught the data and confirm everything made it over, then delete your legacy database when you are absolutely sure its safe
oh okay ,, thanks again man!
no problem!