Changelog
View SourceAll notable changes to psql_tetris are documented in this file. Format
loosely follows Keep a Changelog,
versioning follows SemVer.
0.1.2 - 2026-05-22
Fixing docs.
0.1.1 - 2026-05-22
Changed
- a smol' correction re terminology. Now aligned across
mix.exsdescription, README,CHANGELOGand module docs: the tool optimizes PostgreSQL column alignment (the row-layout improvement is the consequence, not the goal).
Fixed
- Removed an inaccurate "copy-pasteable" doctest from
PsqlTetrisand replaced it with a plain Elixir code block. The previous example includediex>continuation prefixes that were not safe to paste into an IEx session as-is.
0.1.0 - 2026-05-22
Initial release.
Added
PsqlTetris.Formatter:Mix.Tasks.Formatplugin that reorders columns in Ecto migration files for optimal PostgreSQL column alignment.PsqlTetris.Types: Two-layer type classification. Delegates toEcto.Adapters.Postgres.Connection.column_type/2when Ecto is loaded, with a static fallback table mirroring Ecto's documented mapping.PsqlTetris.MigrationRewriter: Text-level rewriter that only touchesadd/2,3calls insidecreate tableandalter tableblocks. Other statements (modify,remove,timestamps, comments, blank lines) act as semantic barriers.PsqlTetris.Optimizer: Pure stable sort by alignment rank, withnull: falsecolumns prioritized within each rank.- Per-block opt-out via
# psql_tetris: skipcomment. - PostgreSQL-only safety gate: detects the host project's database engine
through the presence of the
Postgrexdriver module and refuses to run on MySQL/SQLite/MSSQL projects unless explicitly overridden. - Configuration knobs in
.formatter.exs:migration_paths(glob list, default["priv/repo/migrations/", "/migrations/"]).enabled(true | false, default: auto-detect viaPostgrex).