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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature request: non-transactional migrations for concurrent index creation #352

Open
tgriesser opened this issue Mar 6, 2023 · 1 comment
Labels
api Related to library's API enhancement New feature or request postgres Related to PostgreSQL

Comments

@tgriesser
Copy link
Contributor

tgriesser commented Mar 6, 2023

馃憢 First just wanted to say this project looks awesome! Pretty close to what I wish Knex was if I started it now, with the affordances of modern TypeScript instead of 10 years ago when we were stuck in ES5 and Promises weren't even really an official language construct yet.

I started to play around with it a bit and couldn't find a way to do non-transactional migrations, though there's a chance I was missing something. This is necessary when running statements like CREATE INDEX CONCURRENTLY which cannot be run inside a transaction in PostgreSQL.

Knex does this with a config property that can be set in a migration file:

https://knexjs.org/guide/migrations.html#transactions-in-migrations

export const config = { transaction: false }

Wanted to see if this was something on the radar or if you'd be open to a similar API for configuring per-file migrations, or another approach that'd offer similar support.

@tgriesser tgriesser changed the title feature request: non-transactional DDL for concurrent index creation feature request: non-transactional migrations for concurrent index creation Mar 6, 2023
@koskimas
Copy link
Member

koskimas commented Mar 8, 2023

Hi, and thank you!

I've used knex for a long time and both of my OSS projects owe a lot of their success to knex.

with the affordances of modern TypeScript instead of 10 years ago when we were stuck in ES5 and Promises weren't even really an official language construct yet.

Yeah, objection suffers from the same problem. It was also designed before typescript and good typescript support would mean almost a full rewrite.

About the issue itself: seems like a good (and necessary) addition.

@igalklebanov igalklebanov added enhancement New feature or request api Related to library's API postgres Related to PostgreSQL labels Mar 9, 2023
@kysely-org kysely-org deleted a comment from volnei Aug 15, 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 postgres Related to PostgreSQL
Projects
None yet
Development

No branches or pull requests

3 participants