Odonno / surrealdb-migrations

An awesome SurrealDB migration tool, with a user-friendly CLI and a versatile Rust library that enables seamless integration into any project.
https://crates.io/crates/surrealdb-migrations
MIT License
210 stars 16 forks source link

Thankyou #67

Closed gedw99 closed 7 months ago

gedw99 commented 7 months ago

I was searching for a way for users to do schema evolution of the DSL inside surrealDB and it looks like this can do it.

I am amazed this is not a core part of surrealDB actually because it’s such an important thing to be able to upgrade production / live system

Odonno commented 7 months ago

No. Thank you yourself Gerard.

Like you said, this is an important piece of the puzzle when working with a database. That's why this project exist, but be aware that this is not production-ready.

I am glad if you find it useful.

gedw99 commented 7 months ago

oh I know its not ready. hell neither is surreal really.

If you need help just yell. I am pretty busy but schema evolution is a subject I am into.

here is some new stuff. https://github.com/xataio/pgroll uses https://openpracticelibrary.com/practice/expand-and-contract-pattern/

so you essentially multi versioning the DB in an "eventual" way, so that your API to the middle tier can cope with 2 versions at the same time. That essentially solves a very big PITA for OPS.

It might have some bearing eventually on the surreal db schema evolution. I read that the team are designed for multi versioning btw. Did you see any info on that I wonder ?

Odonno commented 7 months ago

oh I know its not ready. hell neither is surreal really.

Nothing is fully ready in a sense. I mean. Some can be feature complete per their own scope (relational databases like SQL Server, document databases like MongoDB). But the multi-model databases world is a true Pandora box.

If you need help just yell. I am pretty busy but schema evolution is a subject I am into.

Same. Same. Feel free to pick a subject that motivates you.

here is some new stuff. https://github.com/xataio/pgroll uses https://openpracticelibrary.com/practice/expand-and-contract-pattern/

Interesting. Will find the time to read that. Yes, there is quite some innovative solutions/patterns for migrations that rises at the moment. The same goes for databases obviously. Still making sense of what is the best workflow even though not everyone as the same. I really like the one I got right now. But if it don't want to miss interesting improvements.

so you essentially multi versioning the DB in an "eventual" way, so that your API to the middle tier can cope with 2 versions at the same time. That essentially solves a very big PITA for OPS.

Like what GraphQL "invented" with the Obsolete property?

I suppose there are two kinds of data/migrations: cold migrations and hot migrations. Based on the volume of data affected? Intriguing.

It might have some bearing eventually on the surreal db schema evolution. I read that the team are designed for multi versioning btw. Did you see any info on that I wonder ?

Not that I am aware of.