← All projects
Project record1 mention
Originally shared on Hacker News

Build tool for SQL schemas

This build tool lets developers manage SQL schemas as a file tree organized by topic instead of a linear, migrations-based series of scripts. It expresses dependencies between .sql files and concatenates them into one big .sql file that builds the schema. It is being extended to interrogate database system tables (e.g., sqlite_master in SQLite and information_schema.* in Postgres) to analyze differences between successive schema versions and automatically generate simple migrations such as adding a column or renaming a stored procedure.

Last shared
01 / The problem

What it addresses

Writing SQL directly with powerful features like stored procedures and Postgres' ltree extension becomes difficult to manage in a linear, "migrations" based workflow; the tool instead lets schemas be edited like any other codebase, as a file tree organized by topic.

02 / Source history

Shared over time

Each entry reflects what was shared on that date. Details may have changed since then.

  1. Build tool for SQL schemas

    This build tool lets developers manage SQL schemas as a file tree organized by topic instead of a linear, migrations-based series of scripts. It expresses dependencies between .sql files and concatenates them into one big .sql file that builds the schema. It is being extended to interrogate database system tables (e.g., sqlite_master in SQLite and information_schema.* in Postgres) to analyze differences between successive schema versions and automatically generate simple migrations such as adding a column or renaming a stored procedure.

    Problem: Writing SQL directly with powerful features like stored procedures and Postgres' ltree extension becomes difficult to manage in a linear, "migrations" based workflow; the tool instead lets schemas be edited like any other codebase, as a file tree organized by topic.

    Posted by @maxbond · Original source ↗

    Source text · @maxbond · · Source ↗

    I'm writing a build tool for SQL. I like to write SQL directly and to use it's more powerful features (like stored procedures and Postgres' ltee extension). But this is gets difficult to manage in a linear, "migrations" based workflow. I want to edit a file tree organized by topic, not a series of scripts run in order. Which is to say, I want to edit it like I would any other codebase.