[HN Gopher] Atlas - Terraform but for Database Migrations
___________________________________________________________________
Atlas - Terraform but for Database Migrations
Author : wg0
Score : 42 points
Date : 2022-01-21 07:23 UTC (1 days ago)
(HTM) web link (atlasgo.io)
(TXT) w3m dump (atlasgo.io)
| hankchinaski wrote:
| Is it just me or I hate to learn new configuration languages that
| may disappear in no time after having invested time and effort
| learning them? Not just the syntax but all the nuances and the
| configuration options that come with it. If it was a migration
| tool using ANSI SQL as a configuration language I would have been
| to try it out. You can probably achieve the same declarative
| style by using SQL and running a diff between the expected state
| and the current state. So not sure why the custom language is
| needed
| kabes wrote:
| How does this compare to liquibase?
| redact207 wrote:
| I'll never be comfortable with any tool for that automatically
| generates schema changes, as I'm just never sure at what point it
| decides to delete parts of my prod db.
|
| All of my migrations are dumb DDL statements rolled up into a
| version. I know exactly what the final state is as it gets run
| and used when integration testing, staging etc.
|
| It's boring but pretty bulletproof. I can rename a table and be
| confident it'll work, rather than some tool that might decide to
| drop and create a new table.
|
| I can also continue to use SQL and not have to learn HCl for
| databases. This is useful when I want to control how updates are
| done, if I want index updates to be done concurrently Vs locking
| the table.
| ZiiS wrote:
| When documenting a migration tool, show an example of renaming a
| column before working on the logo.
| jiggawatts wrote:
| This is always my only question when the salesperson is
| finished pitching some new provisioning or identity management
| tool.
|
| "Can I rename users when they change their name?"
|
| "Does that happen that often?"
|
| "Half the staff here are female and may change their surname
| when they get married."
|
| "Err.. umm... I think that's a work in progress."
|
| "It's fundamentally impossible with your architecture and it's
| the thing that we need most help automating."
|
| "Err..."
|
| "Thank your for your presentation, we may or may not be in
| touch."
| brycelarkin wrote:
| Is there a reason for creating your own DDL? I imagine it'd be
| possible to use SQL DDL, introspect the database, and then
| generate the appropriate DDL for the migration.
|
| Does the Atlas DDL include more info over sql DDL?
| TameAntelope wrote:
| 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.
| danielrhodes wrote:
| 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.
| TameAntelope wrote:
| I went with Prisma + Nexus + Pal.js + Apollo, which was
| probably at least two layers too complex.
|
| I'm looking, still, for an all-in-one solution to this,
| though I do need more control over my queries/mutations than
| what Hasura would give me.
___________________________________________________________________
(page generated 2022-01-22 23:00 UTC)