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

[Feature] Allow creating indexes using ALTER TABLE ... ADD INDEX #507

Closed
Gaspero opened this issue May 21, 2023 · 0 comments · Fixed by #720
Closed

[Feature] Allow creating indexes using ALTER TABLE ... ADD INDEX #507

Gaspero opened this issue May 21, 2023 · 0 comments · Fixed by #720
Assignees
Labels
api Related to library's API enhancement New feature or request greenlit Ready for implementation mysql Related to MySQL

Comments

@Gaspero
Copy link
Contributor

Gaspero commented May 21, 2023

Currently the only way of creating indexes using Kysely is using createIndex method e.g.:

await db.schema
    .createIndex('user_email_index')
    .on('users_test')
    .column('email')
    .execute()

But MySQL and some other non-standard dialects (YDB for example) also support creating indexes using
ALTER TABLE ... ADD INDEX expressions.

Please consider adding support for creating indexes this way.

@koskimas koskimas added the greenlit Ready for implementation label May 21, 2023
@igalklebanov igalklebanov added enhancement New feature or request mysql Related to MySQL api Related to library's API labels May 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api Related to library's API enhancement New feature or request greenlit Ready for implementation mysql Related to MySQL
Projects
None yet
3 participants