CLI to Manage Your SQL Database Schemas and Migrations
Posted2 months agoActive2 months ago
github.comTechstory
supportivepositive
Debate
20/100
Database ManagementSQLCLI Tools
Key topics
Database Management
SQL
CLI Tools
The HN community shares and discusses 'shed', a CLI tool for managing SQL database schemas and migrations, with users appreciating its simplicity and functionality.
Snapshot generated from the HN discussion
Discussion Activity
Moderate engagementFirst comment
31m
Peak period
6
0-2h
Avg / period
2.4
Comment distribution19 data points
Loading chart...
Based on 19 loaded comments
Key moments
- 01Story posted
Nov 2, 2025 at 1:23 AM EST
2 months ago
Step 01 - 02First comment
Nov 2, 2025 at 1:54 AM EST
31m after posting
Step 02 - 03Peak activity
6 comments in 0-2h
Hottest window of the conversation
Step 03 - 04Latest activity
Nov 3, 2025 at 11:18 AM EST
2 months ago
Step 04
Generating AI Summary...
Analyzing up to 500 comments to identify key contributors and discussion patterns
ID: 45788202Type: storyLast synced: 11/20/2025, 12:47:39 PM
Want the full context?
Jump to the original sources
Read the primary article or dive into the live Hacker News thread when you're ready.
(Checks it out...)
Ahh, this is also Alembic.
https://github.com/ariga/atlas
[1]: https://github.com/pressly/goose
Love how you can write you migrations in go using goose and mix in raw sql migrations as well. Allows for great flexibility when doing complicated migrations and enables writing unit tests for migrations with regular go test
So we had hundreds of databases. And no migrations or way to keep them in sync.
One day I got fed up and ran some statistical analysis on all the databases to find inconsistencies and figure out what the most popular schemas were, because sometimes even when they had the same table and column names, the types were slightly different.
I don't recall if I managed to get them all in sync before I quit.
Hold on, people actually do that? I thought it's trivial to run your database in a container locally.
ORMs are good up until the point you need to include SQL Views, Stored Procedures, Functions, User-defined Types… which is usually the point the ORM abstractions begin to crack (and every SQL Server database I use include them).
For PostgreSQL I usually hand-write the scripts, because it is easier, than fighting against an ORM.
I heard the Redgate tooling is also great to work with, but I’ve never used it personally.
From there, Atlas handles diffing, planning, and execution. This is similar to importing modules in TF, but for database schemas in Atlas. See this example: https://atlasgo.io/guides/orms/sqlalchemy
Disclaimer: I'm involved with Atlas.
Recently I found mycli[1], which seems slightly better than the official mariadb cli client, but still a bit cumbersome.
[1] https://github.com/dbcli/mycli
https://github.com/HeidiSQL/HeidiSQL is very fast but crashes sometimes.
https://github.com/dbeaver/dbeaver is stable but slow/heavy.
For SQLite, I still vastly prefer using custom code to run migrations. Something about the ownership model makes manual external tooling feel inappropriate.
But if it's not, then "no thanks", I already have my native CLI tools bundled with my RDBMS.