R
Railway10mo ago
kane

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
No description
No description
No description
No description
65 Replies
Percy
Percy10mo ago
Project ID: 4713c1f6-1710-4e59-bfc6-2aaa0aaea3e0
kane
kaneOP10mo ago
4713c1f6-1710-4e59-bfc6-2aaa0aaea3e0
Brody
Brody10mo ago
lets get back to a clean slate, delete these services / volumes
No description
Brody
Brody10mo ago
hey @kane - did you ever get a successful migration?
kane
kaneOP10mo ago
Hello No I didn’t
Brody
Brody10mo ago
did you have time to try to work through this?
kane
kaneOP10mo ago
Yes please I’m opening raway
Brody
Brody10mo ago
can you send me a new screenshot of your project?
kane
kaneOP10mo ago
okay
kane
kaneOP10mo ago
i get this when i try to delete one of the migrations , its a production db and i cant risk to loose my data
No description
No description
Brody
Brody10mo ago
slow down there, click here and then click discard changes
No description
Brody
Brody10mo ago
id like another screenshot of your project so i can be absolutely sure that my above screenshot is still correct
kane
kaneOP10mo ago
okay... i discarded as requested
No description
Brody
Brody10mo ago
okay you are not slowing down lol
kane
kaneOP10mo ago
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
Brody
Brody10mo ago
you would unfortunately be wrong, the original database is on the left what database variables are you using in code?
kane
kaneOP10mo ago
see the one i mentioned have the variable section and the legacy doesn't
No description
No description
Brody
Brody10mo ago
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?
kane
kaneOP10mo ago
what info can i give you, or should i reveal the values to you? i dont get the request sorry
Brody
Brody10mo ago
what environment variables are you using in code for your database? maybe DATABASE_URL?
kane
kaneOP10mo ago
no i use the normal db configs to connect to the backend (PGPORT, PGUSER, PGHOST, PGDATA...)
kane
kaneOP10mo ago
thats connection to the backend service
No description
Brody
Brody10mo ago
if you clicked edit on one of those, would it contain a reference like ${{Postgres Legacy.PGHOST}} specifically legacy
kane
kaneOP10mo ago
okay let me check
kane
kaneOP10mo ago
this is my service revealed
No description
Brody
Brody10mo ago
if you clicked edit on one of those...
kane
kaneOP10mo ago
this was the one i thought it was , i was wrong perhaps 😦
No description
kane
kaneOP10mo ago
this is the one you agreed is , i think it has the same settings
No description
kane
kaneOP10mo ago
with my service
Brody
Brody10mo ago
sorry, i should have been more clear, this question is asking about the database variables on your apps service
kane
kaneOP10mo ago
okay i'd send them
kane
kaneOP10mo ago
wow,
No description
kane
kaneOP10mo ago
its the legacy
Brody
Brody10mo ago
okay thats good and to double check, we are looking at the raw editor for your accountGig service?
kane
kaneOP10mo ago
yes sir
Brody
Brody10mo ago
okay okay we doing good
Brody
Brody10mo ago
you can safely delete everything shown in red
No description
kane
kaneOP10mo ago
alright doing that now
kane
kaneOP10mo ago
@Brody we've got this left
No description
kane
kaneOP10mo ago
it's fine yea
Brody
Brody10mo ago
you didnt delete the v2 postgres database?
kane
kaneOP10mo ago
i mean the dude on the bottom right has got no issues 😄
Brody
Brody10mo ago
dude on the bottom right? im not sure i follow? dude == postgres service?
kane
kaneOP10mo ago
sorry, bad humor, i meant this postgres service
No description
Brody
Brody10mo ago
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
kane
kaneOP10mo ago
alright he's going then 🚮
kane
kaneOP10mo ago
Done. But we got this "mount" action up ther
No description
Brody
Brody10mo ago
^
kane
kaneOP10mo ago
oh thats the volume 🤔
Brody
Brody10mo ago
yep
kane
kaneOP10mo ago
ok so i'm to mount? click it i mean?
Brody
Brody10mo ago
delete it
kane
kaneOP10mo ago
oh
kane
kaneOP10mo ago
done
No description
Brody
Brody10mo ago
rename that database to just Postgres
kane
kaneOP10mo ago
okay
kane
kaneOP10mo ago
done
No description
Brody
Brody10mo ago
now run the migration again
kane
kaneOP10mo ago
okay
kane
kaneOP10mo ago
t'was successful, didn't get to this point initially
No description
Brody
Brody10mo ago
let me know if your app works as it should after it deploys
kane
kaneOP10mo ago
okay it does thank you so much
Brody
Brody10mo ago
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
kane
kaneOP10mo ago
oh okay ,, thanks again man!
Brody
Brody10mo ago
no problem!
Want results from more Discord servers?
Add your server