Skip to content

MVP – SQL Schema Migrator (Tracking Issue) #3

@stifskere

Description

@stifskere

This issue tracks the core tasks for building the MVP of atern — a schema migration tool that compares actual database dumps with migration definitions and generates PostgreSQL, MySQL, MariaDB, and SQLite-compatible SQL statements to bridge the difference.

Goal

The MVP should be a tool that

  • Parses SQL/PSQL schemas (starting with CREATE TABLE)
  • Constructs dialect-agnostic Abstract Syntax Trees (ASTs)
  • Computes diffs between two versions of a schema (e.g., dump vs. migration file)
  • Generates dialect-specific SQL migration statements from the diff

Example

Given a dump:

CREATE TABLE xxx (
  id INTEGER AUTOINCREMENT PRIMARY KEY
);

And a migration file:

CREATE TABLE xxx (
  id INTEGER AUTOINCREMENT PRIMARY KEY,
  name VARCHAR(250) NOT NULL
);

atern should generate:

ALTER TABLE xxx
  ADD COLUMN name VARCHAR(255) NOT NULL;

MVP Task Overview


This issue serves as the meta-tracker. Each task is split into its own issue with detailed implementation notes and acceptance criteria.

Metadata

Metadata

Labels

No labels
No labels

Type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions