frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Show HN: Jetbase – A Python database migration tool (Alembic alternative)

https://github.com/jetbase-hq/jetbase
3•jaz1•1d ago
Hi HN, I built Jetbase — a Python-based database migration tool.

Jetbase has: - strict validation to detect altered or removed migration files after they’ve been applied (prevents drift, fails fast) - database locking so multiple migration processes can’t run at the same time - full rollback support - ascending version numbers enforced directly in filenames so migration history is obvious - uses raw sql instead of ORMs

The main Python tool is Alembic, but it’s mainly used with an ORM and doesn’t include things like validation checks. So I built Jetbase to add the features I was looking for.

Some other things I ran into:

- tools with more validation checks than Alembic were usually Java-based, not Python - some tools gate rollback support behind paid tiers - wanted a way to easily see migrations history

Moved off ORMs to raw SQL, which made Alembic’s ORM integration not necessary. Why I moved off: - explored queries directly in DB UI tools (DBeaver, Snowflake) and didn’t want to rewrite them in ORM syntax - ORMs didn’t make sense for Python data pipelines (S3 → Snowflake → Postgres) - raw SQL was more efficient for things beyond basic CRUD - shared a database with a sister team and didn’t want to create extra ORM models in API to query their stuff

Repo (with a quick start guide): https://github.com/jetbase-hq/jetbase

It currently supports Postgres and SQLite (planning to add more databases)

Would love to hear any feedback!

Comments

dmarwicke•1d ago
the sql-first thing is interesting. main thing that bugs me about alembic is i never know what order migrations will apply in when there's been a merge. how does jetbase handle branching?
jaz1•1d ago
Branching is less of an issue than with alembic because each alembic migration is tied to a down revision which causes multiple heads.

In jetbase, migrations are linear. They're applied in ascending version order. So there will always only be one head. any versions introduced that are the same or lower than the current head will fail their migration.

In alembic:

- Current head is A - dev1 adds migration B (A -> B) - dev2 adds migration C (A -> C) - This now causes multiple heads

In jetbase:

- Current head is 1 - dev1 adds migration 2 - dev2 adds migration 2 (but different file contents then branch 1) - The second migration will fail. its version will have to be updated to be > 2 to pass.

jetbase example 2:

- Current head is 1 - dev1 adds migration 2 - dev2 adds migration 3 - if dev1 runs first, then all migrations will be successful. if dev2 runs first, then dev1 will fail because its version is lower than the new head (3)

(sidenote - you can also use 'jetbase new "migration_description"' to automatically generate a new migration file using a timestamp as the version. This can also help stop version conflicts)

In jetbase, it's also easy to see in what order any pending migrations will apply using 'jetbase status'. Below I've listed the migration order related commands.

jetbase status - shows all applied migrations (in order) vs. pending migrations (in order)

jetbase history - shows all applied migrations in order and when they were applied

jetbase current - shows latest migration (head)

Show HN: TestiMoney – Pay to post messages that decay in real-time

https://testimoney.xyz
1•nykodev•51s ago•1 comments

The CNRS is breaking free from the Web of Science

https://www.cnrs.fr/en/update/cnrs-breaking-free-web-science
1•Schiphol•2m ago•0 comments

I designed a vector engine to be RAM/CPU efficient

https://github.com/bicardinal/brinicle
1•saeedq•2m ago•1 comments

Greenland: America's Strategic Imperative

https://substack.com/@sublius/note/p-183535450
1•spacebacon•3m ago•1 comments

Show HN: OSS Sustain Guard – sustainability signals for OSS dependencies

https://onukura.github.io/oss-sustain-guard/
1•onukura•3m ago•0 comments

GOG Patrons- Join gamers keeping classics alive

https://www.gog.com/en/patrons
2•CyMonk•4m ago•0 comments

Embedding WebAssembly in QR Codes

https://strich.io/blog/posts/embedding-webassembly-in-qrcodes/
1•alex_suzuki•5m ago•0 comments

Show HN: Powerful pipeline syntax for IPython and Jupyter

https://github.com/smacke/pipescript
1•smacke•7m ago•0 comments

I switched from VSCode to Zed

https://tenthousandmeters.com/blog/i-switched-from-vscode-to-zed/
3•r4victor•9m ago•0 comments

Ozempic Melted Away Weight–and the Idea of 'Body Positivity'

https://www.wsj.com/opinion/ozempic-melted-away-weight-and-the-idea-of-body-positivity-4917671c
3•RickJWagner•14m ago•1 comments

Can a social app fix the 'terrible devastation' of social media?

https://techcrunch.com/2026/01/04/can-a-social-app-fix-the-terrible-devastation-of-social-media/
1•cdrnsf•15m ago•0 comments

Imagine 130M Washing Machines

https://scottsumner.substack.com/p/imagine-130000000-washing-machines
1•RickJWagner•15m ago•0 comments

One dashboard for all your Git repos – no GitHub knowledge required

1•akhnid•15m ago•1 comments

Singularity Rootkit: SELinux bypass and netlink filter (ss/conntrack hidden)

https://github.com/MatheuZSecurity/Singularity
2•matheuzsec•15m ago•1 comments

All AI Videos Are Harmful (2025)

https://idiallo.com/blog/all-ai-videos-are-harmful
2•Brajeshwar•16m ago•0 comments

Show HN: Inspect your data for subtle data issues before pipeline breaks

https://datumint.vercel.app/
1•sumit_entr42•17m ago•0 comments

Show HN: Lightning Image Viewer – overlay, map-like controls, toggling, image-rs

https://github.com/shatsky/lightning-image-viewer
2•shatsky•18m ago•0 comments

Can't Beat BERT–comparing small LLMs and fine-tuned encoders on classification

https://alex-jacobs.com/posts/beatingbert/
3•tacoooooooo•19m ago•1 comments

BullMQ is usualy the right job queue

https://judoscale.com/blog/node-task-queues
1•wordsaboutcode•19m ago•0 comments

Extremists Flirt with Bots – AI Infiltration of "WhiteDate", "WhiteChild" [video]

https://media.ccc.de/v/39c3-the-heartbreak-machine-nazis-in-the-echo-chamber
2•Hypnosis6173•20m ago•0 comments

JavaScript Rising Stars 2025 – 10th Edition

https://risingstars.js.org/2025/en
3•michaelrambeau•20m ago•2 comments

I ported Photoshop 1.0 to C# in 30 minutes

https://martinalderson.com/posts/ported-photoshop-1-to-csharp-in-30-minutes/
1•martinald•21m ago•0 comments

Show HN: Dating Standards Calculator – Quantify your dating pool with data

https://datingstandardscalculator.com
2•18272837023•21m ago•0 comments

Founding a Company in Germany in 2026 Apparently Takes Three Months

https://eidel.io/founding-a-company-in-germany-in-2026-apparently-takes-three-months/
2•olieidel•22m ago•2 comments

Trump Threatens Venezuela's New Leader with a Fate Worse Than Maduro's

https://www.theatlantic.com/national-security/2026/01/trump-venezuela-maduro-delcy-rodriguez/685497/
1•throw0101d•23m ago•1 comments

Intelligence is not just about task completion

https://www.marble.onl/posts/intelligence_tasks.html
1•amarble•24m ago•0 comments

Who told you you couldn't do that?

https://theaiunderwriter.substack.com/p/who-told-you-you-couldnt-do-that
1•participant26•24m ago•0 comments

Unconventional lessons bootstrapping to a $160M exit in less than 4 years

https://ankitgoyal.substack.com/p/unconventional-lessons-from-my-experience
3•ankit77•25m ago•1 comments

IBM Heritage: The 1964-65 New York World’s FairFair

https://www.ibm.com/history/64-65-worlds-fair
1•teleforce•25m ago•0 comments

Show HN: A spectrogram in the style of Unknown Pleasures album art (Rust+WebGL)

https://aestuans.github.io/spectrogram/
2•aestuans•27m ago•0 comments