Live data from Hacker News

Atlas – Terraform but for Database Migrations

atlasgo.io

91–92 of 92 posts

Re: Atlas – Terraform but for Database Migrations

#91

The dream for any kind of tool like this is to only have to define your data structures once, and use the tool to "generate" related code rather than try to keep two different artifacts in sync (e.g. a GraphQL schema and this DDL). How far along that path has this project progressed? I can't really tell from the main page.

You might find something like Hasura interesting. https://hasura.io/ It is a GraphQL server that sits on top of your Postgres DB and the schema reflects the table schema. It's quite powerful right out of the box. If you combine that on the front-end with Apollo and a Typescript types code generator, you end up with strong typing all the way from your database to the front-end.

there is an open source golang project that does the same thing called GraphJin.

has GUi tooling also.

https://github.com/dosco/graphjin

You give it the Postresql script and you will see the new GraphQL schema in he GUI, ready to test. This means that is only one change point ever - the sql.

It also supports subscriptions.

for CI you can just put the script into your git tree and it will pick them up at the start of a deploy update.

Re: Atlas – Terraform but for Database Migrations

#92
post #47

Earlier quoted context omitted.

Hey, I'm one of the atlas's creator. Thanks for the feedback. I'm actually familiar with all the things you mentioned here (I worked at FB too ;)), and some of them are the reasons why we decided to create atlas and OSS it. First, atm, we support HCL and Go (with fluent API) for describing schemas, but in the next versions, we'll add support for SQL DDLs (e.g. "CREATE TABLE", "CREATE INDEX", etc). Can't promise time…

To be clear, I'm not saying it cannot be done — just that it's hard, especially if it's a one-size-fits-all solution that needs to support many databases and SQL dialects, and that a tool like this is going to continually be fighting the various disparities that exist between databases. I ran into an interesting challenge recently where it was necessary to replace the primary key. The only way to do this (with Postgr…

You might coordinate with the Vitess team to see if there's any interest in sharing code on the parser.
Post reply on HN