frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Show HN: Spawn – PostgreSQL migrate/test build system with minijinja (not vibed)

https://github.com/saward/spawn
1•Winsaucerer•1h ago
Hi! Very excited to share my project spawn, a db migration/build system. For now, it supports PostgreSQL via psql to create and apply migrations, as well as write golden file tests. It has some innovations that I think make it very useful relative to other options I've tried.

GitHub: https://github.com/saward/spawn

Docs: https://docs.spawn.dev/

Shout out to minijinja (https://docs.rs/minijinja/latest/minijinja/) which has made a lot of the awesomeness possible!

Some features (PostgreSQL via psql only for now):

- Store functions/views/data in separate files

- Git diff shows exactly what changed in a function in new migrations

- Easy writing of tests for functions/views/triggers

- Env specific variables, so migrations apply test data to dev/local db targets only

- Generate data from JSON files

- Macros for easily generating repeatable SQL, and other cool tricks (e.g., view tear-down and re-create)

I started this project around two years ago. Finally have been able to get it to an MVP state I am happy with. I love using PostgreSQL and all its features, but current available tooling makes utilising some of those features more challenging

I created spawn to solve my own personal pain points. The main one was, how to manage updates for things like views and functions? There's a few challenges (and spawn doesn't solve all), but the main one was creating and reviewing the migration. The typical (without spawn) approach is one of:

1. Copy function into new migration and edit. This makes PR reviews hard because all you see is a big blob of new changes.

2. Repeatable migrations. This breaks old migrations when building from scratch, if those migrations depend on DDL or DML from repeatable migrations.

3. Sqitch rework. Works, but is a bit cumbersome overall with the DAG, and I hit limitations with sqitch's variables support (and Perl) for other things I wanted to do.

Spawn is my attempt to solve this, along with an easy (single binary) way to write and run tests. You:

- Store view or function in its own separate file.

- Include it in your migration with a template (e.g., {% include "functions/hello.sql" %})

- Build migration to see the final SQL, or apply to database.

- Pin migration to forever lock it to the component as it is now. This is very similar to 'git commit', allowing the old migration to run the same as when it was first created, even if you later change functions/hello.sql.

- Update the function later by editing functions/hello.sql in place and importing it into your new migration. Git diff shows exactly what changed in hello.sql.

Please check it out, let me know what you think, and hopefully it's as useful for you as it has been for me. Thanks!

(AI disclosure: around 90% of non-test code by me, AI was used more once the core architecture was in place, and for assisting in generating docs)

Lessons learned from `oapi-codegen`'s time in the GitHub Secure Open Source Fund

https://www.jvt.me/posts/2026/02/17/oapi-codegen-github-secure/
1•zdw•2m ago•0 comments

"Observability Engineering": a book so nice, we wrote it twice

https://substack.com/home/post/p-186798752
2•donutshop•3m ago•0 comments

Claude Is Okay

1•zerosizedweasle•5m ago•0 comments

Which Future?

https://michaelnotebook.com/whichfuture/
1•yurivish•7m ago•0 comments

Tell HN: Attackers using Google parental controls to prevent account recovery

1•TazeTSchnitzel•8m ago•0 comments

A No-Name Director to Everyone but His 38M Fans

https://www.theatlantic.com/culture/2026/02/iron-lung-markiplier-youtuber-movie-review/686020/
1•zdw•8m ago•0 comments

Out of the blue: A look back at Air Force One's classic design (2018)

https://www.raymondloewy.com/out-of-the-blue-a-look-back-at-air-force-ones-classic-design/
1•hank808•10m ago•1 comments

Show HN: DevDay – End-of-day recap for AI coding sessions

https://github.com/ujjwaljainnn/devday
1•ujjwaljainnn•10m ago•0 comments

Show HN: AIBenchy – Independent AI Leaderboard

https://aibenchy.com
1•XCSme•12m ago•1 comments

Taste for Makers

https://paulgraham.com/taste.html
3•avonmach•13m ago•1 comments

Thin Is In

https://stratechery.com/2026/thin-is-in/
1•maguay•14m ago•0 comments

Other money making uses for the DGX Spark?

1•JerichoJones•16m ago•0 comments

A Guide to Which AI to Use in the Agentic Era

https://www.oneusefulthing.org/p/a-guide-to-which-ai-to-use-in-the
1•Hyeonjong•16m ago•0 comments

Hive – LangGraph for Swift, but built on BSP supersteps

https://github.com/christopherkarani/Hive
1•ckarani•17m ago•1 comments

Show HN: Start an Apple Container in Seconds

https://github.com/beachdevs/container
1•dpweb•19m ago•0 comments

Browser-based Whisper transcription using WebGPU and adaptive model selection

https://cowslator.space/
1•brunochavesj•20m ago•1 comments

Tidal Heating of Io

https://en.wikipedia.org/wiki/Tidal_heating_of_Io
2•thunderbong•20m ago•0 comments

Show HN: Conduit: One Swift interface for every AI provider, on-device and cloud

https://github.com/christopherkarani/Conduit
1•ckarani•22m ago•0 comments

Visualizing how cancer drugs reshape proteins linked to lung cancer

https://phys.org/news/2026-01-visualizing-cancer-drugs-reshape-proteins.html
1•PaulHoule•23m ago•0 comments

Show HN: How I built Timeframe, our family e-paper dashboard

https://hawksley.org/2026/02/17/timeframe.html
2•hawksley•23m ago•0 comments

Zillow teams up with 'World of Warcraft' to exhibit virtual homes inside game

https://www.geekwire.com/2026/zillow-teams-up-with-world-of-warcraft-to-exhibit-virtual-homes-ins...
2•SilverElfin•25m ago•0 comments

Halt and Catch Fire: TV's Best Drama You've Probably Never Heard Of (2021)

https://www.sceneandheardnu.com/content/halt-and-catch-fire
2•walterbell•25m ago•0 comments

Show HN: AgentForge – Multi-LLM Orchestrator in 15KB

https://github.com/ChunkyTortoise/ai-orchestrator
1•chunktort•25m ago•0 comments

I Built AI Live-Streamers

https://mixio.ai
1•hslater101•26m ago•0 comments

6502 Emulation – The Jump Indirect Bug

https://markjames.dev/blog/6502-jump-indirect-bug
1•sanesmith•27m ago•0 comments

I Might Be Wrong

https://www.youtube.com/watch?v=VU52Kx2AXL8
1•luokai•28m ago•1 comments

Minuteman Guidance Computer Emulator

https://github.com/Zaneham/Minuteman-computer-emulator
1•davikr•32m ago•1 comments

Tell HN: The entire internet is having an outage

https://downdetector.com/
4•ent101•35m ago•1 comments

Show HN: Auto-organize – Clean up messy folders with a single npx command

https://github.com/ChristianRincon/auto-organize
2•chris-corner•38m ago•0 comments

Gerenciador de Seguros e VIPs DayZ - Controle Vencimento

https://www.dfg.com.br/pt/outros/gerenciador-de-seguros-e-vips-dayz-controle-vencimento-964228739
1•Baruki•41m ago•0 comments