Is it possible in persistent library to create indexes or constraints for SQL (specifically PostgreSQL)?
Somehow I cant find anything on how to achieve this in the docs, so maybe it is only possible by using raw SQL. If so, what is the way to do it? I woudl assume that the creation and dropping of indexes must be part of the migration :thinking: .
A client of mine has a bunch of constraints on the table that are simply 'key' (mysql). I wouldn't know how to model that in a migration, I believe they're just search indexes: http...
Is it possible in persistent library to create indexes or constraints for SQL (specifically PostgreSQL)?
Somehow I cant find anything on how to achieve this in the docs, so maybe it is only possible by using raw SQL. If so, what is the way to do it? I woudl assume that the creation and dropping of indexes must be part of the migration :thinking: .
Seems like it's not supported natively - https://github.com/yesodweb/persistent/issues/919
Thanks @Georgi Lyubenov // googleson78 for pointing me there, should have searched there first :/ . Will see if I can write my
createSearchIndex
:) .do share if you succeed, I need to do the same thing at some point in the near future :)