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

IF NOT EXISTS support for CREATE INDEX in SQLite #253

Closed
Azarattum opened this issue Dec 18, 2022 · 2 comments
Closed

IF NOT EXISTS support for CREATE INDEX in SQLite #253

Azarattum opened this issue Dec 18, 2022 · 2 comments
Labels
enhancement New feature or request good first issue Good for newcomers greenlit Ready for implementation postgres Related to PostgreSQL sqlite Related to sqlite

Comments

@Azarattum
Copy link

SQLite supports IF NOT EXISTS when creating a new index, however Kysely doesn't give an option to add the modifier. It should look something like:

db.schema
  .createIndex(name)
  .ifNotExists() // Property 'ifNotExists' does not exist on type 'CreateIndexBuilder'.
  .on(table)
  .columns(columns);
@koskimas koskimas added enhancement New feature or request good first issue Good for newcomers greenlit Ready for implementation labels Dec 18, 2022
@koskimas
Copy link
Member

I think all built-in dialects supports this. Let's add it.

@igalklebanov
Copy link
Member

PostgreSQL does support it, MySQL doesn't. 🤷

@igalklebanov igalklebanov added postgres Related to PostgreSQL sqlite Related to sqlite labels Dec 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers greenlit Ready for implementation postgres Related to PostgreSQL sqlite Related to sqlite
Projects
None yet
Development

No branches or pull requests

3 participants