You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have verified this feature I'm about to request hasn't been suggested before.
Describe the enhancement you want to request
As a user of Drizzle, I think it would be a valuable enhancement if the index functions—similar to how custom types work—could encapsulate their migration logic. This would make it easier to create and manage migrate-able indexes, particularly for database systems like Vitess, where specialized indexing strategies are required.
For example, Vitess uses unique patterns for managing indexes, which currently requires a lot of manual handling in migrations. If Drizzle provided a way to define indexes with both their type-safe logic and migration steps in one place, it would significantly streamline this process for developers.
Additionally, adding support for custom tables (e.g., Vitess Sequences) could open up even more flexibility. This would allow developers to define reusable, type-safe abstractions for tables that require special handling, while also tying them into the migration framework seamlessly.
This feature could have a broader impact by encouraging the community to contribute their own database-specific solutions, like Vitess-friendly custom indexes or table definitions. These contributions would not only help the community but could also serve as strong candidates for Drizzle’s first-party offerings, enriching the overall ecosystem.
In essence, encapsulating both runtime and migration logic for indexes and custom tables would make Drizzle significantly more powerful for handling advanced use cases while maintaining the elegance of type safety and simplicity it’s known for.
Here are some related feature requests for custom indexes showing the demand. However, this request extends the pattern into custom tables as well.
Feature hasn't been suggested before.
Describe the enhancement you want to request
As a user of Drizzle, I think it would be a valuable enhancement if the index functions—similar to how custom types work—could encapsulate their migration logic. This would make it easier to create and manage migrate-able indexes, particularly for database systems like Vitess, where specialized indexing strategies are required.
For example, Vitess uses unique patterns for managing indexes, which currently requires a lot of manual handling in migrations. If Drizzle provided a way to define indexes with both their type-safe logic and migration steps in one place, it would significantly streamline this process for developers.
Additionally, adding support for custom tables (e.g., Vitess Sequences) could open up even more flexibility. This would allow developers to define reusable, type-safe abstractions for tables that require special handling, while also tying them into the migration framework seamlessly.
This feature could have a broader impact by encouraging the community to contribute their own database-specific solutions, like Vitess-friendly custom indexes or table definitions. These contributions would not only help the community but could also serve as strong candidates for Drizzle’s first-party offerings, enriching the overall ecosystem.
In essence, encapsulating both runtime and migration logic for indexes and custom tables would make Drizzle significantly more powerful for handling advanced use cases while maintaining the elegance of type safety and simplicity it’s known for.
Here are some related feature requests for custom indexes showing the demand. However, this request extends the pattern into custom tables as well.
#3695
#3789
#3790
The text was updated successfully, but these errors were encountered: