Skip to content

0.22.0

Compare
Choose a tag to compare
@koskimas koskimas released this 01 Oct 12:43
· 503 commits to master since this release

Breaking changes

CreateIndexBuilder used to invalidly add two sets of parentheses in some cases. For example, before you could write a query like this:

db.schema
  .createIndex('idx')
  .on('table')
  .expression('a < 10')

and it worked because Kysely added the needed double parentheses for that particular case. The problem is that not all expressions should have double parentheses and the expression method shouldn't add the second set.

If you've used db.schema.createIndex with a custom expression you may need to add the extra set of parentheses depending on the query (check the database docs). For example in case of our example, you'll need to change it into:

db.schema
  .createIndex('idx')
  .on('table')
  .expression('(a < 10)')