menu

EdgeDB

Bringing state-of-the-art database technology to the masses.

Channels
Team

Production Ready?

February 14, 2020 at 6:24pm (Edited 2 months ago)
I discovered about edge db when I was reading about graphql, so, I would like to know if edge db is production ready for build an ecommerce for example.

February 14, 2020 at 8:28pm
EdgeDB is based on Postgres, so data safety wise it's stable and good to go. That said we still might have bugs in DDL and migrations are about to be redesigned in alpha 3. I'd suggest to wait until beta 1 for serious use, but we encourage you to try building with it now!
like-fill
2
  • reply
  • like
All right! Another doubt, is possible to split schema in different files and run these files through edge cli ?
  • reply
  • like

February 15, 2020 at 10:24pm
, no, not really. I wish I would have recognized that sooner rather than later. From my crash course using EdgeDB in a system I created at work, I made the mistake of trying to use multiple different schema files. Theoretically you could join multiple .edgeql SDL files together before pushing them with a single transaction. That said, it's really useful to maintain a single schema file and load it every time you want to change a little property or link on a type. Link: https://edgedb.com/docs/clients/00_python/usage
Edited
  • reply
  • like
Disclaimer: Your substituent files should definitely not include CREATE MIGRATION foo TO { ... } blocks in each file, but rather only the type definitions contained in the body of the curly-braces. You'd want just a single CREATE MIGRATION block when you go to use one of the cli API methods to connect and propagate your new schema.
Edited
  • reply
  • like

February 16, 2020 at 9:22pm
Last night, I started working on an unofficial terminal app called edbc that does something similar to what I've described above. In order to make it more convenient to experiment with and play with EdgeDB, edbc will take your database connection's DSN and a schema definition file, then make it possible to push new schemas, pull down old/current records as JSON and save them locally before pushing a new schema and data objects from the former schema back up to the server with new schema. It's kind of like a SQL Alchemy interface but still puts some extra labor on the user. As far as I know, EdgeDB doesn't have this kind of tooling yet, but it's a quality of life improvement that I hope people will find useful in the future.
Edited
  • reply
  • like

February 17, 2020 at 6:12pm
We are working on a migration CLI for the next release. Please check out the RFC about the feature.
  • reply
  • like

February 21, 2020 at 11:03am
It's great to have RFCs. <3 One thing about the migrations i had in mind for a while:
I have my schema in one file in my project. But as the project moves on, i need to change the schema and add new types ... So i create migrations.
But now in order to have a full view of my schema, i need to check the schema and all the migrations. It's less than ideal.
I checked the docs, and found a way to describe a module describe module default as sdl which is great. The only difference i noticed is how default values are expressed:
single property currency -> default::Currency {
default := (WITH
MODULE default
SELECT
<Currency>'USD'
);
};
as opposed to default := <Currency>'USD'
But it's not a big deal
  • reply
  • like

February 21, 2020 at 7:04pm
Regarding the default value expressions: that's actually a bit of a bug, we should be able to display the original expression rather than a normalized form.
  • reply
  • like