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
Support Postgres generated column #26
Comments
You can always run raw queries in migrations using |
True, I could always create the table and add a manual alter table after 🤔 Generated column are quite new (PG 12) and to be honest the only time I saw them used is here |
0.9.9 version now has |
0.10.0 also supports materialized views. There's a couple of breaking changes in 0.10.0 https://github.com/koskimas/kysely/releases |
Generated columns are now also supported in master. Not released yet. You can use it like this: db.schema
.createTable('person')
.addColumn('full_name', 'varchar(255)',
(col) => col.generatedAlwaysAs("concat(first_name, ' ', last_name)").stored()
)
.execute() |
Thanks for those 3 extremely quick update, I will try to test these new migration as soon as I can To be honest I had to replace some prisma query for more optimized query and working with Kysely as been fantastic so far, so thank you |
I didn't found a way to use Postgres generated column or to alter a table to add a generated column (no view/materialized view either)
My use case is storing a tsvector representation of another column to allow faster searching with a gin index
Link to the doc just in case
The text was updated successfully, but these errors were encountered: