Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Drizzle ORM for expo-sqlite #3197

Merged
merged 5 commits into from
Nov 13, 2024

Conversation

chakrihacker
Copy link
Contributor

closes #3195

@chakrihacker
Copy link
Contributor Author

@AndriiSherman Can you please take a look here??

@necmettindev
Copy link

@dankochetov @AndriiSherman can we release this pr?

@AndriiSherman AndriiSherman changed the base branch from main to beta November 3, 2024 09:14
@AndriiSherman
Copy link
Member

Thanks! I guess we would need to patch peerDeps for it as well, need to check it

@chakrihacker
Copy link
Contributor Author

I have updated the peer dependency

@bajcmartinez
Copy link

Hi all, any ideas when this can be merged to beta? Thanks!

@necmettindev
Copy link

Patch file for now:

drizzle-orm.patch

@brentvatne
Copy link

brentvatne commented Nov 10, 2024

hello! we will be releasing sdk 52 soon so it would be great to get this landed :) cc @AlexBlokh

@zfben
Copy link

zfben commented Nov 12, 2024

expo 52 has been released, and drizzle orm is broken :(

@PabraiVentures
Copy link

Lets get this merged

@AndriiSherman AndriiSherman merged commit dfbb422 into drizzle-team:beta Nov 13, 2024
AndriiSherman added a commit that referenced this pull request Nov 14, 2024
* Fix breakpoints option default value

* fix: added commonly used columns to supabase auth.users table schema

* imports checker with OHM grammar

* imports checker with OHM grammar + fix of imports issues

* Formatting fix

* [MySQL] Add unsigned floating point types + Fix unsigned integer type bugs in Kit (#3284)

* Fix bugs with MySQL introspection tests

* Update float data type in MySQL

* Better support for float types in MySQL

* Handle existing unsigned numerical types in MySQL

* Add unsigned to floating point types in MySQL

* Handle unsigned floating point types in MySQL

* Update decimal data type

---------

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

* Batch of bugfixes for ORM (#3181)

* (MySQL) Fix placeholder type error in offset and limit

* Add prepared statement tests

* Add PG test

* Fix blob parsing in bun sqlite driver

* Lint and format

* Fix file

* Fix tests

* Use const instead of let in tests

* Format

---------

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

* main to beta (#3404)

* Update Github issue templates (#3157)

* Update GH issue templates

* Update issue templates

---------

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

* Fix checkboxes

---------

Co-authored-by: L-Mario564 <ka.mario564@gmail.com>

* feat: add tablesFilter to pushSchema api (#3141)

* feat: add tablesFilter to pushSchema api

* Format with dprint

---------

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

* Batch of bugfixes for Kit (#2959)

* Escape single quote in enum value

* Escape single quotes in string default values

* Handle instrospection of strings with single quotes

* Add tests

* Add tests

* Uncomment tests

* Fix SQL statement order in MySQL

* Add MySQL test

* Fix alter composite PK statement missing quotes in PG

* Add tests

* Handle SQL expressions in timestamp, date and time in PG

* Use `.run` instead of `.query` in SQLite queries that don't return anything

* Fix parsing of enum array types in PG

* Generate more PG index operators

* Fix primary key recreate on table rename

* Format

* Format

* Update test

* Format

* Fix tests

* Fix terminal output mistake

* Remove duplicate import

---------

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

* Bump versions

* fix: typo (#3172)

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

* Fix typo (#3030)

Trivial: "You ... is ready" -> "Your ... is ready"

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

* [MySQL] Correct $returningId() implementation to correctly store selected fields (#2975)

* Add test to reproduce $returningId() column order issue

Currently, $returningId() only works when the primary key is in the
first column (of the Drizzle table definition not the underlying
MySQL table).

This new test checks for this behaviour by using $returningId()
when the primary key is in the second column.

See #2971

Signed-off-by: Daniel Harvey <daniel@harves.net>

* Fix $returningId() to correctly set selected fields

The local variable `returning` computes the selected fields in
$returningId() but throws this away. Change to correctly
store config in the insert query builder.

Fixed #2971

Signed-off-by: Daniel Harvey <daniel@harves.net>

---------

Signed-off-by: Daniel Harvey <daniel@harves.net>
Co-authored-by: Andrii Sherman <andreysherman11@gmail.com>

* revise and proofread project documentation (#2960)

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

* Fixed lack of schema name on columns in sql (#3531)

* Beta (#3503)

* Fix breakpoints option default value

* fix: added commonly used columns to supabase auth.users table schema

* imports checker with OHM grammar

* imports checker with OHM grammar + fix of imports issues

* Formatting fix

* [MySQL] Add unsigned floating point types + Fix unsigned integer type bugs in Kit (#3284)

* Fix bugs with MySQL introspection tests

* Update float data type in MySQL

* Better support for float types in MySQL

* Handle existing unsigned numerical types in MySQL

* Add unsigned to floating point types in MySQL

* Handle unsigned floating point types in MySQL

* Update decimal data type

---------

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

* Batch of bugfixes for ORM (#3181)

* (MySQL) Fix placeholder type error in offset and limit

* Add prepared statement tests

* Add PG test

* Fix blob parsing in bun sqlite driver

* Lint and format

* Fix file

* Fix tests

* Use const instead of let in tests

* Format

---------

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

* main to beta (#3404)

* Update Github issue templates (#3157)

* Update GH issue templates

* Update issue templates

---------

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

* Fix checkboxes

---------

Co-authored-by: L-Mario564 <ka.mario564@gmail.com>

* feat: add tablesFilter to pushSchema api (#3141)

* feat: add tablesFilter to pushSchema api

* Format with dprint

---------

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

* Batch of bugfixes for Kit (#2959)

* Escape single quote in enum value

* Escape single quotes in string default values

* Handle instrospection of strings with single quotes

* Add tests

* Add tests

* Uncomment tests

* Fix SQL statement order in MySQL

* Add MySQL test

* Fix alter composite PK statement missing quotes in PG

* Add tests

* Handle SQL expressions in timestamp, date and time in PG

* Use `.run` instead of `.query` in SQLite queries that don't return anything

* Fix parsing of enum array types in PG

* Generate more PG index operators

* Fix primary key recreate on table rename

* Format

* Format

* Update test

* Format

* Fix tests

* Fix terminal output mistake

* Remove duplicate import

---------

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

* Bump versions

---------

Co-authored-by: Steffen <3752127+klotztech@users.noreply.github.com>
Co-authored-by: Nicholas Ly <hello@nicholasly.com>
Co-authored-by: Alex Blokh <aleksandrblokh@gmail.com>
Co-authored-by: Sukairo-02 <sreka9056@gmail.com>
Co-authored-by: L-Mario564 <ka.mario564@gmail.com>
Co-authored-by: Dan Ribbens <DanRibbens@users.noreply.github.com>

* Dprint

* Fixed `sql` omitting schema names when processing columns, fixed related test cases

* Fixed dprint formatting issues

* Fixed lack of schema name on integration tests column references

* Removed `\!`

---------

Co-authored-by: Andrii Sherman <andreysherman11@gmail.com>
Co-authored-by: Steffen <3752127+klotztech@users.noreply.github.com>
Co-authored-by: Nicholas Ly <hello@nicholasly.com>
Co-authored-by: Alex Blokh <aleksandrblokh@gmail.com>
Co-authored-by: L-Mario564 <ka.mario564@gmail.com>
Co-authored-by: Dan Ribbens <DanRibbens@users.noreply.github.com>

* Update driver.ts (#3424)

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

* fix: wrong dialect set in mysql/sqlite introspect (#2865)

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

* Extra `update` in comment (#2864)

Removed and extra `update` text in the comment description using onDuplicateKeyUpdate

* chore: export PgIntegerBuilderInitial type as are all other pg-core columns (#2846)

Co-authored-by: Alexis Reymann <alexis.reymann.ext@safrangroup.com>
Co-authored-by: Andrii Sherman <andreysherman11@gmail.com>

* Support more types in text comparing sql expressions (#2805)

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

* drizzle-kit/commands/migrate: fix "you code" typo (#2801)

"put you code below" 
should be
"put your code below"

* Fixed `.generated` behaviour with non-strict `tsconfig` (fixes #2654) (#3542)

* Fix Drizzle ORM for expo-sqlite (#3197)

* Fix Drizzle ORM for expo-sqlite

closes #3195

* bump expo-sqlite version to 14.0.0 in package.json and pnpm-lock.yaml

---------

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

* Upgrade turbo to v2

* Wait for drizzle-orm to be ready

* Format turbo json

* Fix turbo for eslint plugin

* Add release notes

---------

Signed-off-by: Daniel Harvey <daniel@harves.net>
Co-authored-by: Steffen <3752127+klotztech@users.noreply.github.com>
Co-authored-by: Nicholas Ly <hello@nicholasly.com>
Co-authored-by: Alex Blokh <aleksandrblokh@gmail.com>
Co-authored-by: Sukairo-02 <sreka9056@gmail.com>
Co-authored-by: L-Mario564 <ka.mario564@gmail.com>
Co-authored-by: Dan Ribbens <DanRibbens@users.noreply.github.com>
Co-authored-by: Armand SALLE <armand.salle@gmail.com>
Co-authored-by: Christopher Masto <chris@masto.com>
Co-authored-by: Daniel Harvey <daniel@harves.net>
Co-authored-by: wackbyte <wackbyte@protonmail.com>
Co-authored-by: Sergey Reka <71607800+Sukairo-02@users.noreply.github.com>
Co-authored-by: Michael Lohr <michael@lohr.dev>
Co-authored-by: Mickael Lecoq <mkl.lecoq@gmail.com>
Co-authored-by: Asher Chan <asherchan2002@hotmail.com>
Co-authored-by: Alexis Reymann <16920060+Yoctoboy@users.noreply.github.com>
Co-authored-by: Alexis Reymann <alexis.reymann.ext@safrangroup.com>
Co-authored-by: Max Leiter <maxwell.leiter@gmail.com>
Co-authored-by: Subramanya Chakravarthy <chanty.chakravarthy@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG]: Import reference on expo-sqlite is wrong since expo-sqlite@15.0.0
7 participants