would anybody be able to give me some help migrati...
# sql
b
would anybody be able to give me some help migrating my supabase DB schema over to GCP? I plan on using supabase for dev, and am having a tough time with the best way to just copy the db schema over to my GCP Database
j
Wondering if this will help lead you in the right direction
b
Yea, I was able to get the dump, but I think trying to recreate the db in an environment outside of GCP is causing issues
j
Outside of GCP?
b
sorry i was tired and didnt know what i was saying lol
I meant, outside of Supabase
im trying to do it in pgAdmin, and pretty much its erroring out a lot
frankly, all i need is the table schemas + the extensions that are in place for uuid generation and time.now()
just wondering if there was a simpler way
j
@backjisceglia what you do, is you initialise the self-hosted supabase in gcp... then you apply the dump over the top
The only thing that's outstanding after that is your auth settings
b
i apologize but i don't quite understand what this means
j
Ok so you're setting up self-hosted supabase in your GCP right?
b
i just have a Postgres db set up in GCP
j
Perfect ok
Next step is to use the Postgres creds in the self-hosting setup
b
so i dont need to do all of this right? like assuming i need none of the api stuff
j
What do you mean? Maybe I need to ask, what are you trying to achieve?
b
so i have two database tables on supabase
i want those two tables on my gcp instance of postgres
and manually recreating them seems like the incorrect way to go about this
j
You need it replicated or you need supabase to use the gcp db
?
b
replicated
j
Ok well I don’t know how Postgres replication works…
But what you could do is use the http extension + Postgres trigger function and a google function to send data from inside Postgres to gcp
b
Ok yea this sounds difficult
Realistically, if I’ve got 2 relatively basic tables, and I want two instances of them (prod and dev) how much traffic/interaction would I need to eat up all of free tier
Because this is a project I’ll make no money off of and I can’t really afford supabase paid tier. The only reason I’m trying to move to GCP is bc I have a bunch of spare credits
j
I’m not sure, but the free riser in oracle cloud is pretty generous and you could host your own supabase instance there and then migrate the project across using the migration steps in the guide