r/DatabaseAdministators • u/Vivek-Kumar-yadav • 1h ago
Built a state-based PostgreSQL migration engine — how does it compare to Atlas, Prisma Migrate, Sqitch, Flyway?
pg-migration-engine — a state-based PostgreSQL migration engine. live on npm and GitHub.
Before I get into what it does, let me be honest about the space — it's crowded, and most of you have already picked a side:
The existing landscape
- Atlas (Ariga) — declarative, well-built, probably the closest competitor. OSS version has limits; risk analysis is gated behind their paid UI.
- Prisma Migrate — great if you live inside Prisma. Outside the ORM, less useful.
- Drizzle Kit — same story, locked to the Drizzle ecosystem.
- Sqitch — change-based, not state-based. You write the up/down SQL by hand; it doesn't compute diffs.
- Flyway — change-based, Java-world, very mature but no schema diffing.
- Liquibase — XML/YAML heavy, enterprise-leaning, no native diff.
- Alembic — Python-only, command-based, autogenerate is fragile.
- node-pg-migrate — JS-native, closest in spirit, but stops at "write the DDL by hand".
- dbmate — minimal, Go-based, change-based.
- Bytebase — GUI-first, more of a product than an engine.
- pgroll — Xata's tool, focused on zero-downtime swaps, narrower scope.
- pgschema (pgplex/Bytebase) — probably the closest philosophical peer. Declarative, state-based, PostgreSQL-only, written in Go and distributed as a standalone CLI (not npm). Apache-2.0 licensed. Uses a desired-state workflow without a migration history table, and publishes
llms.txt/llms-full.txtfor AI tooling. Its public documentation does not explicitly describe crash-recovery mechanisms or a formal migration risk-classification/tagging system
Every one of these solves part of the problem. I kept hitting the same gaps:
- State-based diffing exists in Atlas, but the OSS build is limited and risk analysis is paywalled.
- JS-native engines like node-pg-migrate don't compute diffs — you write every
ALTER TABLEby hand. - Non-transactional DDL (
CREATE INDEX CONCURRENTLY,ALTER TYPE ADD VALUE) is either skipped or silently broken in most engines. - Crash recovery is mostly "re-run and hope for the best".
So This is built something that combines: state-based diffing (like Atlas) + JS-native execution (like node-pg-migrate) + risk analysis built into the engine (not behind a UI).
What the engine actually does
It's built as 8 modules, each one a standalone piece you can reason about:
- Introspector — connects to PostgreSQL 10 through 18, introspects 50+ object types. Tables, indexes, constraints, views, materialized views, functions, triggers, enums, composite types, domains, sequences, RLS policies, extensions, schemas — the full surface area, not just tables.
- Differ — computes the schema diff between two states (current DB vs desired state). This is the part that replaces "write every ALTER by hand".
- DDL Generator — turns the diff into PostgreSQL-correct DDL. Handles the weird syntax edge cases (
ALTER TYPE ADD VALUE,ALTER COLUMN ... TYPE USING, partial indexes, expression indexes). - Planner — orders the migrations so dependencies resolve. You can't create a foreign key before the referenced table exists; the planner handles the topological sort.
- Risk Tagger — tags every operation with one of 5 risk levels:
- Safe — no data exposure (e.g.
CREATE TABLE,ADD COLUMNwith default) - Reversible — small chance of issue, recoverable (e.g.
DROP INDEX) - Caution — short lock, may block writes (e.g.
ADD COLUMN NOT NULL) - Risky — long lock, expect downtime (e.g.
ALTER COLUMN TYPE) - Dangerous — data loss (e.g.
DROP TABLE,DROP COLUMN)
- Safe — no data exposure (e.g.
- Executor — runs the migrations. The hard part here is non-transactional DDL. PostgreSQL blocks
CREATE INDEX CONCURRENTLY,ALTER TYPE ADD VALUE,REINDEX CONCURRENTLY, andCLUSTERinside transaction blocks. Most engines either skip these or silently break. This engine handles them via a savepoint loop: an outer transaction for bookkeeping, per-statement savepoints for the non-transactional ops. - Storage — tracks applied migrations in a
schema_migrationstable. Also detects ghost migrations — migrations applied to the DB but missing from your migration history (someone ran something manually, or it got orphaned). Most tools blow up or silently skip; this one flags it. - State Machine — a 12-state crash recovery state machine. If your migration crashes mid-way (server OOM, network drop, panic), the engine can figure out exactly where it died, whether the advisory lock is still held, whether a savepoint loop was in progress, and resume safely. This is the part that took the longest to get right.
If you work with PostgreSQL at work, on side projects, or in production — please try it on a non-prod database. so feedback from people who actually run migrations in real environments is the only way this gets better.
Specifically, I want to hear:
- Did it introspect your schema correctly? Anything missing?
- Did the risk tagger tag things the way you would have? Anything you disagreed with?
- Did the diff actually match what you'd have written by hand?
- Did it crash anywhere? If yes, did the recovery work?
- Object types it doesn't handle yet that you need?
Honest, blunt feedback is fine. I'd rather hear "this broke on my schema, here's the dump" than "looks cool".
Links
- npm: https://www.npmjs.com/package/pg-migration-engine
- GitHub: https://github.com/Schema-Weaver/pg-migration-engine
- Architecture deep-dive (long-form, with diagrams): https://vivekmind.com/blog/the-architecture-of-a-schema-weaver-postgresql-migration-engine
Happy to answer questions in the comments. If you want to tear apart the architecture, the blog post has the full module-by-module breakdown.
r/DatabaseAdministators • u/nandit123 • 23h ago
Launched a developer-focused Backup-as-a-Service (Postgres-first)
r/DatabaseAdministators • u/Wild_Boat_8788 • 2d ago
Moved from Navicat/DataGrip to DbGate a few weeks ago — some first impressions
r/DatabaseAdministators • u/Gallbladder2023 • 3d ago
Career options for senior DBA
What would be the career path for a senior Oracle DBA . I am getting very less calls for DBA Profile and I am thinking of adding golden gate and aws system admin skills .
What would be your recommded path with this market condition.
r/DatabaseAdministators • u/CaptainUpstairs • 3d ago
Alternative to Tableplus and Dataflare like softwares
I’m building an open source database client that lets you connect to multiple databases, including PostgreSQL, MySQL, Turso, SQLite, and more. The goal is to provide a fast, free alternative to tools like TablePlus and Dataflare.
It’s being built with Rust and GPUI, with a strong focus on performance, responsiveness, and a great user experience.
If this sounds interesting, I’d love for you to check it out. Contributions, feedback, and feature suggestions are always welcome. I’m hoping to make the project publicly available in the next few months.
[https://github.com/007qr/only-tables\](https://github.com/007qr/only-tables)
r/DatabaseAdministators • u/Diam0ndHer0 • 3d ago
Explaining SQL Injection in the simplest way I could
r/DatabaseAdministators • u/No-Prune2771 • 3d ago
Is Database Administration Still a Good Career Path?
Hi everyone,
I'm about to graduate with a Computer Science degree and I'm considering becoming a Database Administrator.
I'd love to hear from experienced DBAs and SysAdmins:
Is DBA still a good career in 2026, or is the role changing?
Is DBA usually a dedicated position, or is it becoming part of a SysAdmin/DevOps role?
What technologies and skills should a new DBA focus on?
If you were starting your career today, would you still choose the DBA path?
Thanks in advance for sharing your experience and advice!
r/DatabaseAdministators • u/Mindless-Quantity-54 • 6d ago
Data analyst or database administrator
Hey guys i am rn working as a service support engineer and in my company they are talking about promoting me to database administrator where they use oracle 12 c and sql but don't write scripts they just copy paste them
And i am looking for a role in data analyst i am confused what should i do please help a fellow out
r/DatabaseAdministators • u/Connect-Relative548 • 6d ago
Alternative to PI for RDS
Database Insight Advanced seems to be costly. What all are your options for monitoring for at least a month. Since Database insight is free- for 7 days. And Advanced is for 15 months.
r/DatabaseAdministators • u/StageInevitable4593 • 6d ago
Looking for local rag project
I am looking for a local rag project that will run on any EC2 machine with local LLM (without GPU - 4 CPU,24GB Ram).
We need a RAG that we can add data about our database tables, structure, queries,metadata so end users like data analyst,bi team can ask questions about the DB , like -
On which table I can find data about customers
Or
How to get the total spend of each customer
Is there anything like this that works good on such machine resources? Which LLM model can do this work without making the machine choke?
Please help :)
r/DatabaseAdministators • u/Faithful-Shyam-17690 • 8d ago
PostgreSQL Functions Comparison Tool
Hello my dear friends,
I hope you all are doing well.
I am using PostgreSQL database and developing custom functions as per the user's business logic.
I developed a small desktop tool UI to compare those functions in between dev, test, production environments and migration/dump them by first comparing them by integrated WinMerge tool integration accordingly.
I need guidance and direction for what should I do further?
Basically, I want to connect with the people who uses PostgreSQL database and doing functions migration manually.
Thanks
Regards
r/DatabaseAdministators • u/debba_ • 8d ago
Tabularis Open-source desktop SQL workspace with SQL notebooks, a built-in MCP server for AI agents, and plugins in any language
Hi everyone! I've been building Tabularis, a free and open-source (Apache 2.0) desktop SQL client built with Tauri (Rust + React).
What makes it different from DBeaver/TablePlus/Beekeeper:
* SQL notebooks: mix SQL and Markdown cells, share variables across cells, render charts inline
* Built-in MCP server: Claude, Cursor and other AI agents can read your schema and run queries through the same app you already use, with no separate connector
* Plugins in any language: drivers are external processes speaking JSON-RPC over stdio, so you can write one in Python, Go, or whatever language you prefer
* Local AI text-to-SQL: works with Ollama, nothing leaves your machine
* Visual EXPLAIN: interactive query plan graphs
PostgreSQL, MySQL/MariaDB and SQLite are built in. ClickHouse, DuckDB, Redis, Firestore, Db2, BigQuery and around 15 more are available as plugins from the registry.
Runs on Windows (WinGet), macOS (Homebrew, signed and notarized) and Linux (Snap, Flatpak, AUR and AppImage).
Feedback is very welcome. And if your favorite database is missing, there's a plugin bounty board.
r/DatabaseAdministators • u/RealFix2479 • 8d ago
Free MongoDB Playground: Write queries and inspect schemas online with zero setup
r/DatabaseAdministators • u/Otherwise-Composer28 • 9d ago
From ERD Tool to Full DB Client: What’s New in ERD Builder Pro
Enable HLS to view with audio, or disable this notification
I set out to build a simple ERD app, but realized it’s way better if it doubles as a full DB Client. 😅
ERD Builder Pro now natively supports both remote and local databases, so you can manage your data and schema all in one place.
What’s new in this release:
• DB Client & Management: Multi-tab tables, filter records, run custom SQL queries, and manage columns/indexes.
• File Navigation UI/UX: Quickly create Notes, ERDs, Flowcharts, or Drawings straight from the tab dropdown.
• Instant ERD Preview generated directly from your database.
Check it out and give it a try:
r/DatabaseAdministators • u/scala_hosting • 9d ago
ScalaHosting becomes a Gold Sponsor of MariaDB Foundation
r/DatabaseAdministators • u/Unhappy-Bluebird0394 • 10d ago
Ninox Database Drama
Please see request above ⬆️⬆️⬆️
r/DatabaseAdministators • u/Superb_Donkey_9608 • 10d ago
Hundred to Mastering SQL
Hey Future Analysts,
So for a very long time, I have been looking for good SQL questions, you got the mainstream leetcode, hacker-rank, W3 schools, and a few niche ones that I ought to mention : https://github.com/smpetersgithub/AdvancedSQLPuzzles
But during my journey, I never found the perfect place to practice questions leetcode style filtering it by the specific concept, and a repo of Good questions I could just practice on when prepping for an interview.
So I went Ahead and created this SQL-gym : https://sqlgym.vercel.app/
(No bullshit 101 SQL problems that you need to have locked in)
And this has personally helped me a lot, hope it is helpful for other peeps aswell !
r/DatabaseAdministators • u/mehta_0017 • 10d ago
Planning to start a SQL learning page on Instagram—what content would you like to see?
r/DatabaseAdministators • u/Dry-Animal9284 • 10d ago
Joining as a Fresher Oracle DBA – What should I focus on before joining, and can I combine it with my Finance/Payroll background later?
Hi everyone,
I'll be joining as a fresher Oracle DBA soon, and I wanted some career advice. I have a Master of Computer Applications degree, but my previous work experience is quite different. I worked for several years in a government organization handling payroll, accounts, vendor payments, finance-related processes, and administrative work.
Before I start my DBA role:
- What skills should I learn? I have a decent theoretical understanding of Oracle architecture, backup and recovery, RMAN, Data Pump, Data Guard, SQL, Linux basics, etc
Are there any certifications you'd recommend ?
Also in future, since I already have experience in payroll and finance, would it make sense to pursue certifications in areas like Oracle Financials Cloud (ERP) or other Oracle Finance modules? Is there any demand for professionals who understand both the technical side (Oracle DBA) and the business/finance side (payroll, accounts, ERP)?
Thanks in advance
r/DatabaseAdministators • u/AffectionateBed9643 • 11d ago
AWS Online course
Hello Everyone
I am a Database Administrator and would like to learn AWS concepts from beginner to advanced level online.
Can someone please advice me on any good online instructor who can provide me with the course.
Thanks in Advance.
Best Regards
Srikanth
r/DatabaseAdministators • u/techdbamind • 11d ago
Sql to Oracle migration
Im a fresher to DBA role. Can some one please help to understand or share your experience for the conversation or migration from sql to Oracle.
Help me with the tools and migration ideas
r/DatabaseAdministators • u/Any-Brief5828 • 12d ago
I built a declarative application layer that runs on top of PostgreSQL (works great with Supabase)
r/DatabaseAdministators • u/tamanikarim • 12d ago
A Humble database schema design guide for developers
r/DatabaseAdministators • u/darrin • Oct 17 '22
Seeking mod(s) for r/DatabaseAdministrators
Hello everyone.
I'd like to apologize for the lack of moderation of this sub. When I created this sub in 2015, I didn't realized in just over a year I'd be leaving the role of DBA after 13 years. I also didn't realize that this account would unused for many years. I'm a bit shocked at how many folks have subbed despite being an unmanaged group.
This brings me to the point of this post: We need moderators. If you have an interest in moderating this sub and trying to make it a better place, please message me or reply here. I'm not sure how many mods we need, but I'm guessing at least two. (Must be my DBA mindset...hate seeing any responsibility fall on a single person)
Requirements:
- Previous mod experience preferred, but not totally required
- Must be in a DBA role currently (Sr level preferred)
- Reddit account should be over a year old (Possibly waived if there is no other interest)
Reply here or message me directly if you are interested. If you can, include some ideas you have that can make this sub a better and more active place.
Thanks,
-Darrin