Skip to content

Beta#5377

Closed
AndriiSherman wants to merge 1344 commits into
mainfrom
beta
Closed

Beta#5377
AndriiSherman wants to merge 1344 commits into
mainfrom
beta

Conversation

@AndriiSherman
Copy link
Copy Markdown
Member

No description provided.

RomanNabukhotnyi and others added 28 commits December 17, 2025 13:04
* updated tests

* +

* updated tests

* [drizzle-kit] updated tests

* [drizzle-kit] added tests

* [drizzle-kit] added tests

* [drizzle-kit] updated test

* added tests

* updated pull tests

* +

* [integration-tests] updated tests

* corrected issue links

* [drizzle kit] added test

* [drizzle-kit] added test

* [drizzle-kit] added tests

* [feat-orm]: index logic

Added ability to pass table column to index, uniqueIndex, using in outer const. Without using 3rd param in table

* added tests

* updated tests

* [drizzle-kit] added tests

* [fix+update]: mysql use/force/ignore index update + pg asc/nullsFirst index update

Mysql:
- Added ability to handle unique constraints in use/force/ignore indexes in select queries
- Added tests

Pg:
- in drizzle-kit/drizzle.ts file updated logic regarding nullsFirst and asc/desc creation
pg docs: https://www.postgresql.org/docs/current/sql-createindex.html

* [update]: changelog

* [drizzle-kit] added tests

* [psql]: fixed broken tests in kit

* [mysql]: fixed some an issue in kit

* [sqlite]: isssue + fk introspect bugs fixed

* [mssql]: index bug fix in kit

* [cockroach]: fixed tests in kit

* [sqlite]: fk introspect fix

* [psql]: kit pk tests

* [update]: changelog for drizzle-kit

* [mssql]: kit fix

* [drizzle-kit] added tests

* [mssql-kit]: up to v2

* [kit]: psql + cockroach enum tests

* [drizzle-kit] added tests

* updated comments in tests

* [update]: kit tests update

* [update]: ignored ts error for deploy

* [update-casing]: removed casing from Name class

* [update]: isNull wrapped in ()

* [updates]: tests + bug fixes

- Fixed "buildIndex" method in mysql for `use/force/ignore` indexes
- Updated some integration tests

* [update]: fixed int:sqlite tests

* [update]: singlestore int test

* [update]: singlestore test

* [update]: changelog for kit + up of package.json versions of orm and kit

* [update]: changelog + test

* [drizzle-kit] added tests

* [drizzle-kit] added test

* updated test

* [update-kit]: psql test

* [update-kit]: fixed tests

Added:
- handling on column alters to serial in pg
- suggestions for diff in mysql

* [update-kit]: deprecated 'strict' flag

* [update-kit]: test

* [update-kit]: test

* [update-kit]: mssql test

* [update-kit]: fix

* [update-kit]: added explain to every dialect

* added tests

* fixed prompt for column conflicts; added tests

* [update-kit]: sqlite up fixes

- Added tests on up (like pg and mysql had)
- fixed some minor fixes

* [fix-kit]: errors in mocks

* [fix-kit]: mssql fixes

* [fix-kit]: tests fix to deploy

* [fix-kit]

* [fix-kit]

* [fix-kit]

* [update]: versions + changelog for sqlite

* [update]: comment

* [update-kit]: fixed mssql + new tests

* [fix-kit]: --explain handling

* Update release notes

---------

Co-authored-by: OleksiiKH0240 <homenko0240@gmail.com>
Co-authored-by: Alex Blokh <aleksandrblokh@gmail.com>
Co-authored-by: AndriiSherman <andreysherman11@gmail.com>
Co-authored-by: Andrii Sherman <andreysherman11@gmail.com>
* updated tests

* +

* updated tests

* [drizzle-kit] updated tests

* [drizzle-kit] added tests

* [drizzle-kit] added tests

* [drizzle-kit] updated test

* added tests

* updated pull tests

* +

* [integration-tests] updated tests

* corrected issue links

* [drizzle kit] added test

* [drizzle-kit] added test

* [drizzle-kit] added tests

* [feat-orm]: index logic

Added ability to pass table column to index, uniqueIndex, using in outer const. Without using 3rd param in table

* added tests

* updated tests

* [drizzle-kit] added tests

* [fix+update]: mysql use/force/ignore index update + pg asc/nullsFirst index update

Mysql:
- Added ability to handle unique constraints in use/force/ignore indexes in select queries
- Added tests

Pg:
- in drizzle-kit/drizzle.ts file updated logic regarding nullsFirst and asc/desc creation
pg docs: https://www.postgresql.org/docs/current/sql-createindex.html

* [update]: changelog

* [drizzle-kit] added tests

* [psql]: fixed broken tests in kit

* [mysql]: fixed some an issue in kit

* [sqlite]: isssue + fk introspect bugs fixed

* [mssql]: index bug fix in kit

* [cockroach]: fixed tests in kit

* [sqlite]: fk introspect fix

* [psql]: kit pk tests

* [update]: changelog for drizzle-kit

* [mssql]: kit fix

* [drizzle-kit] added tests

* [mssql-kit]: up to v2

* [kit]: psql + cockroach enum tests

* [drizzle-kit] added tests

* updated comments in tests

* [update]: kit tests update

* [update]: ignored ts error for deploy

* [update-casing]: removed casing from Name class

* [update]: isNull wrapped in ()

* [updates]: tests + bug fixes

- Fixed "buildIndex" method in mysql for `use/force/ignore` indexes
- Updated some integration tests

* [update]: fixed int:sqlite tests

* [update]: singlestore int test

* [update]: singlestore test

* [update]: changelog for kit + up of package.json versions of orm and kit

* [update]: changelog + test

* [drizzle-kit] added tests

* [drizzle-kit] added test

* updated test

* [update-kit]: psql test

* [update-kit]: fixed tests

Added:
- handling on column alters to serial in pg
- suggestions for diff in mysql

* [update-kit]: deprecated 'strict' flag

* [update-kit]: test

* [update-kit]: test

* [update-kit]: mssql test

* [update-kit]: fix

* [update-kit]: added explain to every dialect

* added tests

* fixed prompt for column conflicts; added tests

* [update-kit]: sqlite up fixes

- Added tests on up (like pg and mysql had)
- fixed some minor fixes

* [fix-kit]: errors in mocks

* [fix-kit]: mssql fixes

* [fix-kit]: tests fix to deploy

* [fix-kit]

* [fix-kit]

* [fix-kit]

* [update]: versions + changelog for sqlite

* [update]: comment

* [update-kit]: fixed mssql + new tests

* [fix-kit]: --explain handling

* Update release notes

* [sqlite-kit-fix]: introspect + explain

* [update-kit]: fixed two issues

* [fix-kit]: deepStrictEqual + fixed broken tests

* [update-kit]: fixed issues

* [update-kit]: added custom type for sqlite introspect + up all packages

* [fix-kit]: defaults for text

* added tests

* [fix-kit]: fixed + postponed tests

* [fix-kit]: sqlite def test

---------

Co-authored-by: OleksiiKH0240 <homenko0240@gmail.com>
Co-authored-by: Alex Blokh <aleksandrblokh@gmail.com>
Co-authored-by: AndriiSherman <andreysherman11@gmail.com>
* [update]: int tests removed skipIf in some tests

* [update-kit]: changelog

* [update-kit]: pg index issue fixed

* [kit-fix]: pg + cockroach issue

* [kit]: mssql issue

* Fixed bun-sqlite rqbv2 mapper error on empty get response (fixes #5189)

* Up all versions to 7 + orm changelog

* changelog update

* [update-kit]: tests on ignore migrations config schema/table + minor updates

* [fix-kit]: fixed all fromDatabaseForDrizzle params

* [fix-kit]: fixed broken tests

* [kit-fix]: broken tests

---------

Co-authored-by: OleksiiKH0240 <homenko0240@gmail.com>
Co-authored-by: Alex Blokh <aleksandrblokh@gmail.com>
Co-authored-by: AndriiSherman <andreysherman11@gmail.com>
Co-authored-by: Sukairo-02 <sreka9056@gmail.com>
* bug fixes

* +

* fix regex

* added min/max parameters to time, datetime, timestamp generators,
updated tests for using these generators(+date generator) with parameters,
added feature to ignore column in refinements

* fixes

* test for ignoring columns

* partly added seq update

* updates pg seq after seeding

* +

* updated uuid generator

* updated test

* fixed drizzle-seed build bug

* turbo.json fix

* turbo.json fix

* Update api for min max

---------

Co-authored-by: Andrii Sherman <andreysherman11@gmail.com>
Co-authored-by: Alon Amster <m@ster.am>
- Fixed lack of query result recalculation on pg dynamic update with joins
- Support for `@effect/sql-pg` driver
- `@effect/sql-pg` driver support  
- Reworked `pg`: `execute`-less core builders, `async`,`effect` `query-builders`,`session`,`preparedQuery` variants  
- Improved `PgColumn` types: better type performance, simpler declaration, reworked `.array()` to use `.array('[][]')` syntax instead of `.array().array()`  
---------

Co-authored-by: Alex Blokh <aleksandrblokh@gmail.com>
* Tagged effect errors for effect drivers, fixed kit `bun-sql` `sqlite`, `mysql` driver variants using `pg` functions

* Typo fix

* Extended type tests for columns with `strictNullChecks: false`

* Fixed broken type inferrence of `PgColumn`s with `"strictNullChecks": false` typescript option caused by updates in `1.0.0-beta.9`
* updated tests

* +

* updated tests

* [drizzle-kit] updated tests

* [drizzle-kit] added tests

* [drizzle-kit] added tests

* [drizzle-kit] updated test

* added tests

* updated pull tests

* +

* [integration-tests] updated tests

* corrected issue links

* [drizzle kit] added test

* [drizzle-kit] added test

* [drizzle-kit] added tests

* [feat-orm]: index logic

Added ability to pass table column to index, uniqueIndex, using in outer const. Without using 3rd param in table

* added tests

* updated tests

* [drizzle-kit] added tests

* [fix+update]: mysql use/force/ignore index update + pg asc/nullsFirst index update

Mysql:
- Added ability to handle unique constraints in use/force/ignore indexes in select queries
- Added tests

Pg:
- in drizzle-kit/drizzle.ts file updated logic regarding nullsFirst and asc/desc creation
pg docs: https://www.postgresql.org/docs/current/sql-createindex.html

* [update]: changelog

* [drizzle-kit] added tests

* [psql]: fixed broken tests in kit

* [mysql]: fixed some an issue in kit

* [sqlite]: isssue + fk introspect bugs fixed

* [mssql]: index bug fix in kit

* [cockroach]: fixed tests in kit

* [sqlite]: fk introspect fix

* [psql]: kit pk tests

* [update]: changelog for drizzle-kit

* [mssql]: kit fix

* [drizzle-kit] added tests

* [mssql-kit]: up to v2

* [kit]: psql + cockroach enum tests

* [drizzle-kit] added tests

* updated comments in tests

* [update]: kit tests update

* [update]: ignored ts error for deploy

* [update-casing]: removed casing from Name class

* [update]: isNull wrapped in ()

* [updates]: tests + bug fixes

- Fixed "buildIndex" method in mysql for `use/force/ignore` indexes
- Updated some integration tests

* [update]: fixed int:sqlite tests

* [update]: singlestore int test

* [update]: singlestore test

* [update]: changelog for kit + up of package.json versions of orm and kit

* [update]: changelog + test

* [drizzle-kit] added tests

* [drizzle-kit] added test

* updated test

* [update-kit]: psql test

* [update-kit]: fixed tests

Added:
- handling on column alters to serial in pg
- suggestions for diff in mysql

* [update-kit]: deprecated 'strict' flag

* [update-kit]: test

* [update-kit]: test

* [update-kit]: mssql test

* [update-kit]: fix

* [update-kit]: added explain to every dialect

* added tests

* fixed prompt for column conflicts; added tests

* [update-kit]: sqlite up fixes

- Added tests on up (like pg and mysql had)
- fixed some minor fixes

* [fix-kit]: errors in mocks

* [fix-kit]: mssql fixes

* [fix-kit]: tests fix to deploy

* [fix-kit]

* [fix-kit]

* [fix-kit]

* [update]: versions + changelog for sqlite

* [update]: comment

* [update-kit]: fixed mssql + new tests

* [fix-kit]: --explain handling

* Update release notes

* [sqlite-kit-fix]: introspect + explain

* [update-kit]: fixed two issues

* [fix-kit]: deepStrictEqual + fixed broken tests

* [update-kit]: fixed issues

* [update-kit]: added custom type for sqlite introspect + up all packages

* [fix-kit]: defaults for text

* added tests

* [fix-kit]: fixed + postponed tests

* [fix-kit]: sqlite def test

* added tests

* added tests

* removed migration prefix from drizzle-kit

* [update-kit]: handle custom migration schema and table in push + tests

* [kit-fix]: tables tests

* [kit-fix]: cli tests

* [fix-kit]

* [update-kit]

* [update]: int tests removed skipIf in some tests

* [update-kit]: changelog

* [update-kit]: pg index issue fixed

* [kit-fix]: pg + cockroach issue

* [kit]: mssql issue

* Fixed bun-sqlite rqbv2 mapper error on empty get response (fixes #5189)

* Up all versions to 7 + orm changelog

* changelog update

* [update-kit]: tests on ignore migrations config schema/table + minor updates

* [fix-kit]: fixed all fromDatabaseForDrizzle params

* [fix-kit]: fixed broken tests

* [kit-fix]: broken tests

* added tests

* added tests

* [kit-fix]: mysql fixes

* added tests

* [kit-fix]: fixed issues 5224 and 5212

* [kit-fix]: fixed psql issue

* [kit-fix]: entity filter update for pg

* [kit]: removed .only

* [kit-fix]: introspect fix for pk

* [kit-fix]: returned entity filter logic back as it was

* [kit-fix]: added some tests + tests on tsc relations

* fixed test

* orm timestamp batch + noop cache ignored from cache + mysql cyclic introspect

* Separated date and int-exclusive column methods from common pg builder

* added tests

* upped versions + upped skipped tests dates + changelogs + extra tests

* skipped tests

* extra fix + test

---------

Co-authored-by: OleksiiKH0240 <homenko0240@gmail.com>
Co-authored-by: Alex Blokh <aleksandrblokh@gmail.com>
Co-authored-by: AndriiSherman <andreysherman11@gmail.com>
Co-authored-by: Sukairo-02 <sreka9056@gmail.com>
* Added migrator from migration journal to `bun-sqlite`
* Fixed lack of placeholders in update

* Fixed broken test cases

* Additional test case fixes

* Additional test case fixes

* Fixed lack of alias proxying for view's `selectedFields`, fixed lack of alias handling for views in `from` clause

* Fixed broken test concurrency

* Fixed broken ternary condition

* Post-cache mapping of query result in effect-pg

* Extended test case skip duration

* Fixed drizzle-constructor not passing cache to EffectPgSession constructor

* Extended tests postpone date

* Improved config types for `exactOptionalPropertyTypes`

* +

* added tests

* Fixed bun-sqlite db.get(...) returning data in array mode instead of object mode (@Sukairo-02 commit)

* [kit-fix]: schema errors - added all cases for all dialects

* added orm changelog for beta 12

* moved formatToMillis in migrator.ts to migrate.utils.ts to avoid unintentional imports

* [kit-update]: ts schema error handling for generate + push

* [kit-update]: export command now throws errors if smthing wrong with the schema

* added tests

* added orm changelog

* Fixed `formatToMillis` import in migrators
Removed not valid test

* merged beta-fixes and updated changelog for orm

* postponed some tests

* fixed #4950 issue

* [kit-update]: tests

* [kit-fix]: fixed upper for pg

* postponed tests

* [kit-fix]: fixed test

* up package.json versions

* added tests

* [update]:

- Handled .inlineParams() for sql``
- Removed T['data'] from generatedAlwaysAs. It is now only SQL and () => SQL types

* updated changelogs

* remove .only from tests

* added tests

* fixed tests + build selection for single table

* added to all .generatedAlwaysAs tests sql`` instead of literals

* updated kit changelogs

* postponed + fixed tests

* postponed + fixed tests

---------

Co-authored-by: Sukairo-02 <sreka9056@gmail.com>
Co-authored-by: OleksiiKH0240 <homenko0240@gmail.com>
* Improve drizzle-effect integration, add type tests

* Update imports

* Remove comments

* Fix services providing

* Cleanup effect logger and cache

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update type tests

* Fix import

* Add attw concise mode

* fix(drizzle-kit): support top-level await in config and schema files

Replace require() with async loadModule() using jiti to enable top-level await in user config and schema files on Node.js.

- Add loadModule() function with jiti for TypeScript files
- Update config loading in utils.ts
- Update schema loading in studio.ts and dialect files
- Add Node version check (requires 18.19+, 20.6+, or 21+)
- Bun/Deno continue using native import()

* Removed unused tracing

* postpone more

* Update release notes

---------

Co-authored-by: Sukairo-02 <sreka9056@gmail.com>
Co-authored-by: AndriiSherman <andreysherman11@gmail.com>
* Fixed lack of placeholders in update

* Fixed broken test cases

* Additional test case fixes

* Additional test case fixes

* Fixed lack of alias proxying for view's `selectedFields`, fixed lack of alias handling for views in `from` clause

* Fixed broken test concurrency

* Fixed broken ternary condition

* Post-cache mapping of query result in effect-pg

* Extended test case skip duration

* Fixed drizzle-constructor not passing cache to EffectPgSession constructor

* Extended tests postpone date

* Improved config types for `exactOptionalPropertyTypes`

* +

* added tests

* Fixed bun-sqlite db.get(...) returning data in array mode instead of object mode (@Sukairo-02 commit)

* [kit-fix]: schema errors - added all cases for all dialects

* added orm changelog for beta 12

* moved formatToMillis in migrator.ts to migrate.utils.ts to avoid unintentional imports

* [kit-update]: ts schema error handling for generate + push

* [kit-update]: export command now throws errors if smthing wrong with the schema

* added tests

* added orm changelog

* Fixed `formatToMillis` import in migrators
Removed not valid test

* merged beta-fixes and updated changelog for orm

* postponed some tests

* fixed #4950 issue

* [kit-update]: tests

* [kit-fix]: fixed upper for pg

* postponed tests

* [kit-fix]: fixed test

* up package.json versions

* added tests

* [update]:

- Handled .inlineParams() for sql``
- Removed T['data'] from generatedAlwaysAs. It is now only SQL and () => SQL types

* updated changelogs

* remove .only from tests

* added tests

* fixed tests + build selection for single table

* added to all .generatedAlwaysAs tests sql`` instead of literals

* updated kit changelogs

* postponed + fixed tests

* postponed + fixed tests

* [kit-update]: Fix view ordering in schema serialization to respect dependencies in all dialects

This commit contains update login in `drizzle.ts` file
When using `prepareFromSchemaFiles` to read schema files, views were returned in an unpredictable order (not in order that is was declared in schema.ts). This caused dependent views to appear before their dependencies, which breaks migration

* added tests

* fixed #1227; added test; made pg drizzle-kit tests run on multiple PostgreSQL versions

* [update]: migrator for all dialects

The migrator now applies all changes that are missing in the database. Previously the migrator only looked for local migrations with a creation date later than the last migration applied in the database. It now detects and applies all missing migrations

Added tests for all dialects

* postponed tests

* postponed tests + update test

* postponed test

* [update]: merged #5272 issue fix + postponed some tests

* [update]: fixed kit + orm tests + updated changelogs

* Restricted usage of async functions in sync drivers' transactions

* added tests

* fixed drizzle-seed bug

* fix lockfile and package.json specifiers mismatch

* added tests

* [update-kit]: fixed issues + updated changelog

* [update-kit]: postponed + fixed tests

* [update]: kit + int postponed tests

* [update]: upped all packages versions. fixed failed tests

* fixed kit test

* [update-kit]: updated comment

* [update-kit]: fixed drop index

* [fix-kit]: serial introspect

* [update]: minor int tests updates

* upped packages versions

* +

* [fix-kit]: missed from merging

* added tests

* [update-orm]: fixed mssql transactions

* Update effect

* tests on migrator effect + postponed tests

* renamed test migration dir

* update effect migrator test

---------

Co-authored-by: Sukairo-02 <sreka9056@gmail.com>
Co-authored-by: OleksiiKH0240 <homenko0240@gmail.com>
Co-authored-by: AndriiSherman <andreysherman11@gmail.com>
* Added explicit origin to `SQL.Aliased` fields used in selections of views and CTEs

* Fixed tests

* Fixed `sqlite` select order & group by clauses not accepting `SQL.Aliased`, removed `SQL.Aliased` origin prefix for single table queries

* Kit test fix

* Autogenerated `name` for prepared queries (#5311)

* Made `query.prepare(name)` name param optional

* Added tests for nameless prepared statements

* Autogenerated prepared query names for `pg`, `cockroach`, `gel`, code cleanup

* @effect/Schema validator generator, validator generators in orm package (#5295)

- Added `@effect/Schema` validator generator
- Fixed validator generators having entities used for output types being marked as `@internal`
- Fixed validator generators generating wrong types for JSON columns when type does not satisfy `Record<string, unknown>`
- Moved validator generators to `drizzle-orm/validations`
- Moved legacy typebox (`@sinclair/typebox`) generator to `drizzle-orm/validations/typebox-legacy`
- Supported `typebox v1` generator in `drizzle-orm/validations/typebox` (fixes #5011, credits to #5076)  

---------

Co-authored-by: AndriiSherman <andreysherman11@gmail.com>

* Update release notes

---------

Co-authored-by: AndriiSherman <andreysherman11@gmail.com>
Copy link
Copy Markdown

@github-advanced-security github-advanced-security AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CodeQL found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants