SurrealDB Migration Tool for Node.js

My interest in SurrealDB has really grown the past few days. I really feel like it can replace ArangoDB in my stack. The only issue is the same issue I had when I adopted ArangoDB: there aren't a lot of tools for Node.js. Like ArangoDB, I'll maybe have to build some myself. The first such tool is a CLI migration tool.

First of all, the Surrealist database manager application is awesome. It's great, it really is and, while ArangoDB has it's web client, it has functionality I missed using ArangoDB that I used to have for relational databases. That is a great tool, but it's more of a development and management tool. I need a migration tool for automation and to make my applications more portable.

Today I made a big push toward creating this tool and it's named Surrealigrate. I've built tools like it for other databases, such as the one we use for All The Flavors, Arangrate for ArangoDB, and I had initially built a multi-database tool for the CMS behind this site (now it uses Prisma, well, for now). Surrealgrate isn't quite ready, but like I said, it's getting very close. It's the first thing I've built from the ground up with AI assistance, which has sped up development considerably. Unfortunately, AI's aren't perfect, so there were a few issues and I had to rewrite portions of it, but most of the changes were just oversights that occurred as I asked the AI to add specific features in steps.

I need to build Surrealigrate up fairly quickly, so I can move some of my current projects to it and get them moving again. While it is already more advanced than my other tools have been, there will be more features coming later. Using AI allowed me to put in a lot of things initially that I wouldn't have had time to do right now. One different approach I'm taking with this tool is it's not intended to be an NPM package. It's intended to be included in a project as a component, potentially using git submodules. I'm hoping this approach makes it more useful per-project and will lead to others contributing.

David D.

0
3
0
349

Comments

Ronald

Ronald

5 months ago

Hi David,

I am interested in your approach and would like to try your work on surrealigrate. It could work as a submodule but also as a package in a mono-repo (wich my project is). I have one database with a main namespace and a namespace per customer (multi-tenant setup). This means I have multiple namespaces and thus need the setup to be a little more flexible. Please let me know your thoughts on this and don not hesitate to contact me. If we can cooperate I am willing to join you in developing this tool.

Kind regards,
Ronald, The Netherlands

Ronald

Ronald

5 months ago

Used today to implement this in my monorepo. First I tried it as a normal package but that is not compatible with a monorepo because you get 2 .git folders. Created a git submodule and it works like a charm. The project is divided in 6 different Docker containers that delivers services for AI assistants and processes. I use surrealdb for the administrative tasks and am experimenting with its vector index capabilities. The migration is run in production at the end of the container build and called from the Dockerfile. This looks promising.. Next step is trying to get it working for multiple namespaces.

David D.

David D.

5 months ago

Hi! I don't have email notifications set up on this site yet, so I missed your comments. Sorry about that.

David Dyess .com

Copyright © 1999 - 2024