3 ms·
> If I have an existing postgres db how hard is it to migrate? The main hurdle would to migrate the schema. You'll have to define your schema in Gel (take a lo
by 1st1 2y ago
> If I have an existing postgres db how hard is it to migrate?
The main hurdle would to migrate the schema. You'll have to define your schema in Gel (take a look at the reference here [1]) and write a script to copy your data.
We are discussing internally how we can simplify this process, this is becoming a popular question.
> Can I write regular joins if I need to?
You can use EdgeQL and SQL side by side now though one connection in the same function. Gel's schema is still relational (even though it's more powerful with features like multiple inheritance).
This page describes the details [2] of how SQL works with our schema (spoiler: it's very straightforward and no different from a hardcoded SQL schema).
> Do you have plans or do you already support db branching ?
We call Postgres databases "branches" in Gel. And we have tooling around them [3] to have git-like experience with them. Conceptually you can map (manually) your Gel branches to your Git branches if you wish.
[1] https://docs.geldata.com/reference/datamodel https://docs.geldata.com/reference/datamodel
[2] https://docs.geldata.com/reference/reference/sql_adapter#querying https://docs.geldata.com/reference/reference/sql_adapter#que...
[3] https://docs.geldata.com/reference/cli/gel_branch https://docs.geldata.com/reference/cli/gel_branch
- krashidov 2y agoThank you for the response! This is great info. > The main hurdle would to migrate the schema I'm sure you know this but I know drizzle lets you generate schemas from an existing db. Not sure how applicable that is to Gel. https://orm.drizzle.team/docs/drizzle-kit-pull https://orm.drizzle.team/docs/drizzle-kit-pull > We call Postgres databases "branches" in Gel. And we have tooling around them [3] to have git-like experience with them. Sounds like it's a yes - thanks!