Version Packages - #31
Merged
Merged
Conversation
github-actions
Bot
force-pushed
the
changeset-release/master
branch
from
August 25, 2026 09:26
5ef6137 to
25cb018
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to master, this PR will be updated.
Releases
sequelize-typescript-migration@1.0.0
Major Changes
484fc69Thanks @kimjbstar! - Modernized for Sequelize 6, with experimental Sequelize 7 support.This release fixes several bugs that were silently changing what got generated. Run your
first migration with
preview: trueand read the output — you will see differences thatare not schema changes you made.
Data that used to disappear
@Default(...)never made it into a generatedfile: the value was computed and then discarded when the attribute object was reassigned.
Falsy defaults (
@Default(false),@Default(0)) were dropped even earlier, by a truthyguard.
JSON,DOUBLE,FLOATandREALcolumns now appear. The type lookup missed them —DataTypes.JSON's class is namedJSONTYPE— so they degraded toVIRTUALand the callerskipped the column entirely, with nothing logged.
a placeholder is what made the two bugs above possible.
Migrations that could not run
BLOBno longer emits a bare identifier.Sequelize.BLOB((long))threwReferenceErrorthe moment sequelize-cli loaded the file;DataType.BLOBwithout a lengththrew
TypeErrorwhile generating.ARRAYandRANGEno longer recurse infinitely. Both branches extracted the innertype and then recursed on themselves.
CHAR(n)keeps its length.Postgres
FROM SequelizeMetawas folded tolowercase and failed with
relation "sequelizemeta" does not exist, which made the toolunusable on Postgres (upstream #3, #4, #10).
parsed object; SQLite has no JSON type and returns the raw text, which read as "nothing has
ever been migrated" and regenerated the whole schema every run.
Ordering
settled a chain of three but not four — measured, half of the input orderings of a
four-table chain came out wrong, and 95 of 120 for five. This is the README's old
"undo(down) action may not work" admission, now closed.
references.modelis read correctly in all three places (two were misspelled).Breaking changes
sequelizeandsequelize-typescriptare now peer dependencies, and no databasedriver is bundled — install the one for your dialect yourself.
makeMigrationno longer callsprocess.exit. It returns a discriminated union:{ status: 'no-changes' | 'preview' | 'written' }.used to be swallowed, leaving the next run diffing against a stale state.
previewis genuinely read-only — it no longer creates the bookkeeping tables.of the object that described them, so reordering decorator options no longer looks like a
schema change. Existing indexes are re-created once, on the first run after upgrading.
New
npx sequelize-typescript-migration --config ./db.js --out-dir ./migrations.The
binfield previously pointed at a file with no entry point.adapts to whichever version you pass it. v7 is still alpha upstream, hence experimental.
and the one the
-lts/@techntoolsforks use, so switching from a fork keeps your history.Patch Changes
2f82f62Thanks @kimjbstar! - Fixedunderscored: trueand explicitfieldnames being ignored.Migrations were generated against attribute names rather than column names, so a model with
underscored: trueproduced a table of camelCase columns — one the model itself could notthen read. The same applied to any column with an explicit
field, and to index fieldlists: an index declared on
actorNamewas created onactorNamerather thanactor_name.Sequelize already resolves this onto
attribute.field, in both v6 and v7, so this needs nonaming-convention option — unlike the
useSnakeCaseflag some forks added.If you use either feature, your previously generated migrations named the wrong columns.