drizzle-team / drizzle-orm

Headless TypeScript ORM with a head. Runs on Node, Bun and Deno. Lives on the Edge and yes, it's a JavaScript ORM too 😅
https://orm.drizzle.team
Apache License 2.0
23.51k stars 576 forks source link

[FEATURE]: drizzle-kit migration missing relevation info on unsupported SQLite feature #2489

Open faribauc opened 3 months ago

faribauc commented 3 months ago

Describe what you want

Hi,

Whenever I run drizzle-kit generate:sqlite and it tries to do something not supported, a message similar to the following is added to the migration file:

/*
 SQLite does not support "Drop not null from column" out of the box, we do not generate automatic migration for that, so it has to be done manually
 Please refer to: https://www.techonthenet.com/sqlite/tables/alter_table.php
                  https://www.sqlite.org/lang_altertable.html
                  https://stackoverflow.com/questions/2083543/modify-a-columns-type-in-sqlite3

 Due to that we don't generate migration automatically and it has to be done manually
*/

There is no relevant information whatsoever in that message that indicates which field of which table is affected by this change.

Adding that information is critical to allow the developer to add the right migration SQL code.

Thanks!