v1.11.0
·
18 commits
to main
since this release
Immutable
release. Only release title and notes can be modified.
Fixed
- The migration engine only worked on MySQL (
modules/let-migrate). A
commit titled "refactor: remove deprecated methods" had restoredsrc/,
tests/and the README byte-for-byte to their state before a day of merged
PR work — undoing four driver fixes and a Laravel-parity alias, and deleting
the eight tests that covered them. Nothing was failing that the deletion
fixed. Restored and carried forward:ALTER TABLEcompiled MySQL syntax for every driver — additions batched
into one comma-separated statement, indexes added withADD KEY, and drops
running columns BEFORE the indexes over them. A rollback written in the
correct order was reordered by the compiler into one that could not run
anywhere but MySQL, in the one direction nobody exercises until they
uninstall a plugin.- PostgreSQL rejected
BOOLEAN DEFAULT 1, andmodifyColumn()emitted three
;-joined statements into a clause the extended query protocol refuses. - SQLite could not add a foreign key to an existing table, and
modifyColumn()
compiledCREATE TABLE "__tmp_users" ()— it was broken outright, because
the rebuild SQLite requires was driven from a blueprint holding only the
delta. It now reconstructs the full table from theSchemaInspector,
carrying existing indexes across and unwrapping defaults so a literal is
not re-quoted on every rebuild. - Seeding a second database in one run died with Cannot redeclare class —
reachable the moment one run seeds once per driver, which is what
hkm ground migratedoes.
- PostgreSQL: every schema lookup silently matched nothing. The driver and
inspector used libpq's$1placeholders, which PDO neither understands nor
rejects — sotableExists()answeredfalsefor a table with seven columns,
and the inspector reported no columns, indexes or foreign keys. Anything
guarded byhasTable(), and everything built on schema diffing or dumping,
was quietly wrong on that driver. Found only by executing against a live
server. - SQL Server emitted invalid T-SQL for every column addition and every
foreign key —ALTER TABLE … ADD COLUMN(T-SQL has noCOLUMNkeyword
there) andON DELETE RESTRICT(unimplemented; its actions areNO ACTION,
CASCADE,SET NULL,SET DEFAULT). Both are argued from the T-SQL
specification and are not verified against a live server — none was
reachable — but each replaces SQL the server rejects outright. MigrationConfig: singularpathoverrode pluralpathsinstead of
acting as its fallback, so a config carrying both silently ran one directory
and ignored the array — failing by doing less work rather than by erroring.Blueprint::dropColumn()accepted one column, sodropColumn('a', 'b')
silently dropped onlya. Now variadic, and thedrop*methods chain.
Added
useCurrent()/useCurrentOnUpdate()/bigIncrements()— Laravel
parity, so a ported migration compiles unchanged. Without them the failure is
a fatal Call to undefined method raised the moment the migration runs,
during a deploy.StatusRenderer—migrate:statusas normalised data, aligned table
lines and JSON from one source, so the human and--jsonviews cannot
disagree.tests/Live— the migration compiler executed against every reachable
engine. Configured withLETMIGRATE_DB_MYSQL/_PGSQL/_SQLSRV
(GROUND_DB_*honoured); each run uses its own scratch database and drops it.
A driver that is unconfigured or not answering SKIPS with the reason, never
counted as a pass. This release was verified on SQLite, MariaDB 12.3 and
PostgreSQL 18; SQL Server skipped, and says so.
Changed
docs/guides/18_MIGRATIONS.md—->useCurrent()and->useCurrentOnUpdate()
now exist, so the anti-pattern entry saying they do not is corrected. The
->index()half stands: an index is declared on the Blueprint, not the
column.
What's Changed
🔄 Other Changes
- Dev mac by @hakeemRash in #146
- Master by @hakeemRash in #147
- ci: bump actions/checkout from 5 to 7 in the actions group by @dependabot[bot] in #148
- Release v1.11.0 — the migration engine works on every driver again by @hakeemRash in #149
New Contributors
- @dependabot[bot] made their first contribution in #148
Full Changelog: v1.10.1...v1.11.0