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.
Not 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.
Comments (1,152) 576 threads
Show all comments
Showing thread 114 of 576
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.