2 ms·
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
by maxbond 2y ago
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.
I've written code allowing me to express dependencies between .sql files and to concatenate them into one big .sql file that builds your schema. I'm working on interrogating the systems tables of the database to analyze the difference between successive versions of a schema, to automatically generate simple migrations (like adding a column or renaming a stored procedure). Eg, `sqlite_master` in SQLite, and `information_schema.*` in Postgres.
- nbbaier 2y agoThis sounds very cool - I'm really interested in this angle. Got a sharable repo?
- maxbond 2y agoNot presently! I'm on vacation and intentionally left my laptop at home. But if you send me an email I could send you a link when I push it to GitHub; my email is in my profile. Otherwise, I'm planning to do a Show HN around mid November. If you check my submissions on December 1st it'll be there.
- nbbaier 2y agoSent you an email!